473,397 Members | 2,056 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Another way???

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") =
"http://localhost/cpncms_v1/cms/viewpage.aspx" Then
ds = GetDataSet(("SELECT content FROM tblPageContent WHERE
pageID=" + rowID.ToString()))
iNews = True
ElseIf Request.ServerVariables("HTTP_REFERER") =
"http://localhost/cpncms_v1/cms/news/pgeEditor.aspx" 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
Nov 19 '05 #1
4 1159
Tim::.. wrote:
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


Why not just pass a variable to the page, in the Querystring to
differentiate the page you came from?

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
Nov 19 '05 #2
Thanks...

Why didn't I think of that... DOWWW!

"Curt_C [MVP]" wrote:
Tim::.. wrote:
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


Why not just pass a variable to the page, in the Querystring to
differentiate the page you came from?

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

Nov 19 '05 #3
Tim::.. wrote:
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


Why not just pass a variable to the page, in the Querystring to
differentiate the page you came from?

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
Nov 19 '05 #4
Thanks...

Why didn't I think of that... DOWWW!

"Curt_C [MVP]" wrote:
Tim::.. wrote:
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


Why not just pass a variable to the page, in the Querystring to
differentiate the page you came from?

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Daniel Tan | last post by:
Are there anyway to copy rows of records from one query to another query and then hide the records in source query ? Pls advise. Thanks. Regards, Daniel
3
by: Kathy Burke | last post by:
Hi, I'm tired, so this question may be silly. I have a fairly long sub procedure. Based on one condition, I load another sub with the following: If Session("GRN") = "complete" Then txtScan.Text...
17
by: Rabbit | last post by:
Hi, On my 1st page, i have a function which gets a new ID value and need to transfer to another immediately. which I want to get in 2nd page using Request.form("txtID"), but doesn't work, the...
16
by: Mike | last post by:
Hi, I have a form with some controls, and a different class that needs to modify some control properties at run time. Hoy can I reference the from so I have access to its controls and...
3
by: Sin Jeong-hun | last post by:
It seems like the Protect() uses the Windows accout information to encrypt data. If I know the user name and the password, can I decrypt it on another PC? If it is not, how about the exported key?...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.