Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > save post data without session variable?

Reply
Thread Tools

save post data without session variable?

 
 
SLH
Guest
Posts: n/a
 
      10-02-2006
i have an asp page with a form that posts to itself. (the action of the form
is the same page the form is on). i validate input and dont accept it if
there is something wrong with it. problem is that when the form is
submitted, and i display the error message, the data the user typed in the
box is gone. i work around this by setting a session variable as soon as the
user hits submit and store the data the user typed. then for the default
value of the textbox i have <%= Session("var") %> and that leaves the users
data in the box for them to edit. is there a better way i could do this?


 
Reply With Quote
 
 
 
 
Aaron Bertrand [SQL Server MVP]
Guest
Posts: n/a
 
      10-02-2006
<input type=text name=FieldName
value="<%=Server.HTMLEncode(Request.Form("FieldNam e"))%>">



"SLH" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>i have an asp page with a form that posts to itself. (the action of the
>form is the same page the form is on). i validate input and dont accept it
>if there is something wrong with it. problem is that when the form is
>submitted, and i display the error message, the data the user typed in the
>box is gone. i work around this by setting a session variable as soon as
>the user hits submit and store the data the user typed. then for the
>default value of the textbox i have <%= Session("var") %> and that leaves
>the users data in the box for them to edit. is there a better way i could
>do this?
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save and recovering post data Kirsten ASP .Net 0 09-01-2009 12:52 PM
Session state has created a session id, but cannot save it because the response was already flushed by the application ganeshd@gmail.com ASP .Net 3 08-17-2007 04:33 AM
how to automatically "Save " a page after certain intervals without clicking "Save Page As..." subhadip Java 0 03-28-2007 04:15 PM
How can i share asp session data with asp.net session data far asl via DotNetMonster.com ASP .Net 3 03-23-2005 05:13 AM
Post post post. Shel-hed Computer Support 2 11-08-2003 07:41 AM



Advertisments