Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
ASP .Net
Another way???
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Guest, post: 471609"] Could someone please tell me a nother way I could achieve the following... I'm having problems because of a component within mya ASP.NET page due to the ViewState set in the component! I currently have a text editor ("editor.aspx") and two different content mangement pages showing the pages available to edit viewpage.aspx and PgeEditor.aspx I want to update the appropriate table in the database according to which page the user can from eg: Chose a page from viewpage or PgeEditor The code below works fine apart from my Boolean keeps getting reset to FALSE in the code because of the text editor component I'm using... Would really appritiate any suggestions... HELP Thanks <CODE> ' Works fine Private Function GetDocument() As String Dim ds As DataSet If Request.ServerVariables("HTTP_REFERER") = "[URL]http://localhost/cpncms_v1/cms/viewpage.aspx[/URL]" Then ds = GetDataSet(("SELECT content FROM tblPageContent WHERE pageID=" + rowID.ToString())) iNews = True ElseIf Request.ServerVariables("HTTP_REFERER") = "[URL]http://localhost/cpncms_v1/cms/news/pgeEditor.aspx[/URL]" Then ds = GetDataSet(("SELECT content FROM tblNewsArchive WHERE newsID=" + rowID.ToString())) iNews = False End If Dim table As DataTable = ds.Tables(0) Dim row As DataRow = table.Rows(0) Dim doc As String = row("content").ToString() Return doc ds.Dispose() End Function 'GetDocument ' Sub UpdateDocument doesn't work as iNews always equals FALSE Private Sub UpdateDocument(ByVal doc As String) Dim strSQL As String = "" If iNews = True Then strSQL += "UPDATE tblPageContent SET content='" strSQL += (doc.Replace(Chr(39), Chr(39) + Chr(39))) strSQL += "' WHERE pageID=" + rowID.ToString() RunQuery((strSQL)) Else strSQL += "UPDATE tblNewsArchive SET content='" strSQL += (doc.Replace(Chr(39), Chr(39) + Chr(39))) strSQL += "' WHERE newsID=" + rowID.ToString() RunQuery((strSQL)) End If iNews = Nothing End Sub 'UpdateDocument [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
ASP .Net
Another way???
Top