Ask a Question related to ASP.NET General, Design and Development.
-
Satish Appasani #1
Ideal way of posting a value to a new page?
Is there any ideal way of passing values to another page using Post method
and avoiding Sessions and Viewstate?
I have used Viewstate unsuccessfully. Though I've set all the required
attributes to the form including enableviewstatemac property to false. But
it did not work.
The I used the following code:
In the source page add the code:
Me.Context.Items.Add("Value", txtValue.Text)
In the destination page add the code :
Me.Context.Items.Item("Value").ToString
This was working on my machine but when I moved it to the client's server, I
was getting error "Viewstate corrupted". I felt the problem was with the
client's .NET Framework version. They use 1.0 whereas I use 1.1. So, atlast
I pulled in the Session. This was working fine. After I use the data fetched
by the session, I am putting the value in the ViewState of the destination
form and killing the session (Session("ID") = Nothing). Now, If I click on
the browser's refresh button, my application does not work because I don't
have the value in the session. And the Viewstate also does not contain the
stored value wither.
I can't retain the value in the session because else where in the
application I am opening the same page but then don't pass any values.
I was thinking there should be an ideal way to post values to a new page
other than using Viewstate and Session.
--
Thank you.
Satish Appasani
#201, Wing - 1, Block - D
Cyber Gateway
Hyderabad - 500 081, India
Phone: +91(40)2311-1356 Ext-122
Mobile: +91(40)333-31032
E-mail: [email]satish@vertexcs.com[/email]
Satish Appasani Guest
-
Posting vars to a .php page
Can I use the getUrl function to post a form in flex to a php file and the insert all my post vars?? -
Posting ASP .Net web form to another asp page
Hi, I need help in posting asp .net application web form to another asp based web app. I have seen many examples using HttpWebRequest class... -
Posting to another page question
Hi! I have Portal application which is on http. However I like to do user authentification using SSL I like approach most sites use: They... -
Ideal website only Flash?
Hello, Suppose you want to build the ideal website. No problems with different explorers (even the exotic ones), no problems with different... -
posting to another aspx page
Hi! This is my problem: I want to go from page1 to page2, and to get all the form variables from page1 to page2. I have turned the... -
Natty Gur #2
Re: Ideal way of posting a value to a new page?
Hi,
If I understood you correctly you trying to pass a Form data from page
to page (using server.transfer ?) and getting invalid viewstate. If this
is the case the reason is related to the fact that the target page tries
to get the last state of controls from the forms __viewsatate field but
the control tree of the target page don’t match the control tree stored
in __viewstate. You can workaround it by sending the Form as an object
in the Context object and get its values in the target page.
Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114
Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377
Know the overall picture
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Natty Gur Guest



Reply With Quote

