RTB Problem with ADO.Net
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngrichtextbox' list.


Alexander Campbell
This page is just timing out and won't even give me an error msg... any
ideas?

<%@ Page Language="VB" explicit="true" debug="true" %>
<%@ Register TagPrefix="RTB" Namespace="RichTextBoxControl"
Assembly="RichTextBox" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>

<!-- #include
virtual="/alexcampbell/alexasp_portal/aa_auth/CheckAuth/default.aspx" -->
<% Call CheckAuth(9) %>

<SCRIPT LANGUAGE="VB" RUNAT="SERVER">

Public myDataView as DataView
Public Article_content as String
Public Article_title as string
Public Article_description as string
Public Article_idno as integer

Sub Page_Load(sender As Object, e As EventArgs)
If Not IsPostBack
            Dim myConnection As New
SqlConnection(ConfigurationSettings.AppSettings("alexaspPortalConn"))
            Dim cmd As New SqlCommand

            Dim mySqlDataAdapter as SqlDataAdapter = new
SqlDataAdapter("Select * From AlexASP_Articles Where Article_ID='" &
Request.QueryString("ID") & "'",myConnection)
            Dim myDataSet as DataSet = new DataSet()
            mySqlDataAdapter.Fill(myDataSet,"AlexASP_Articles")
            Dim myDataView as DataView = new
DataView(myDataSet.Tables("AlexASP_Articles"))
            Dim i As Integer
            For i = 0 to myDataView.Count -1
                Article_Content =
myDataView(i)("Article_Content").ToString()
                Article_title =
myDataView(i)("Article_Title").ToString()
                Article_description =
myDataView(i)("Article_Description").ToString()
                article_idno =
CInt(myDataView(i)("Article_ID").ToString())
            Next i

Else
            Dim myConnection As New
SqlConnection(ConfigurationSettings.AppSettings("alexaspPortalConn"))
            Dim myCommand As New
SqlCommand("AAP_EditArticle",myConnection)
            myCommand.CommandType = CommandType.StoredProcedure
            myCommand.Parameters.Add("@ArticleContent",
Request("rtfContent"))
            myCommand.Parameters.Add("@ArticleID",
Request("hdnID"))
            MyCommand.Connection.Open()
            MyCommand.ExecuteNonQuery()
            MyCommand.Connection.Close
    
Response.Redirect("/alexcampbell/alexasp_portal/aa_content/ModifyAllArticles
/")
        End If

End Sub

</SCRIPT>

<%@ Register TagPrefix="HeaderTemplate" TagName="AlexASP"
Src="/alexcampbell/header.ascx" %>
<%@ Register TagPrefix="FooterTemplate" TagName="AlexASP"
Src="/alexcampbell/footer.ascx" %>

<HeaderTemplate:AlexASP sTitle="Add Article Page" runat="server"/>
<%

Title.Text = Article_title
Description.Text = Article_description
article_id.value = Article_idno

%>

<form runat=server>

Article Title: <asp:textbox name="Title" runat=server />
Article Description: <asp:textbox name="Description" runat=server />
<input type=hidden id=article_id runat=server />
<br>

<br>
<RTB:RichTextBox id="myRTB" runat="server"><%= Article_content
%></RTB:RichTextBox>

<input type="hidden" name="hdnSubmit" value="True">
<input type="Submit" value="Submit" runat="server" />

</form>

<FooterTemplate:AlexASP runat="server"/>
--
Message protected by MailGuard: e-mail anti-virus and content filtering.
http://www.mailguard.com.au/tt

Reply to this message...
 
    
Ollie Cornes

Hi Alex,

The first thing I'd try is swapping out the RichTextBox for a TextBox so
you can see if it is the editor or your DB code that is causing the problem.

Ollie
--
http://www.richtextbox.com/
The No.1 content editor for ASP.NET

[Original message clipped]

Reply to this message...
 
 
System.Configuration.ConfigurationSettings
System.Data.CommandType
System.Data.DataSet
System.Data.DataView
System.Data.SqlClient.SqlCommand
System.Data.SqlClient.SqlConnection
System.Data.SqlClient.SqlDataAdapter
System.EventArgs
System.Web.UI.MobileControls.TextBox
System.Web.UI.WebControls.TextBox
System.Windows.Forms.RichTextBox
System.Windows.Forms.TextBox




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com