Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I going back?
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00821939
Message ID:
00823964
Views:
25
Mike,
I just tried what I think you mean, and when my page comes back up the input fields are empty...the data is gone.

Do I need to pass the data along via session variables or query line or what do I need to do to not lose the data?

Rick
------------------------------------
>>I have a form collecting data from the user.
>>When they click submit I go to a server side validation.
>>If the validation fails I want to go back to the page the user was entering data on...
>>
>>How do I get back there?
>>...to the page with the data, not to a page with an empty form.
>>
>>TIA,
>>Rick
>
>Typically in the past I designed my pages to post back to themselves when server side page validation was required. If the validation passed I issued a server transfer to the next page. If it failed the page was sent back to the client with the submitted data filled in plus any validation error messages. This is also a typical approach used in ASP.NET.
>
>You could also do this by returning some javascript to the client that issues a history back command. You could also issue an alert dialog to inform the client of the error. I do not recommend this approach since it could fail to execute on some client browsers. You would basicly send code like:
>
>
><html>
><head>
><script language="javascript">
>function doc_init()
>{
>   alert("Your error message");
>   document.history.go(-1);
>}
></script>
></head>
><body onload="doc_init();">
></body>
></html>
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform