be accomplished by doing a post from one page to another page.
If a webform as fields for user information (address, name, phone,
etc) and a submit button... What is the best way in asp.net to
re-display the information and ask the user to verify the info is
correct.
Will I do a post back to the same webform, remove the previous web
server controls and redraw the page w/ the new information?
Would it be best to transfer to a new page (via Response.Redirect
(url) or Server.Transfer (url)) and get the information from the first
webform?
thanks,
rogerIt's probably easiest to do something like posting the data to a new form
which will display it to the user and ask for confirmation. You could also
write your original page to check for whether this is a postback or not,
and then generate the form's target and the data fields on the fly.
Assuming your page is "page1.aspx" it might be something like:
<some header information>
...
if (isPostBack = true) then
Response.Write("Please confirm the data and hit sumbit again (or some
other message)");
endif
if (isPostBack = true) then
response.write("<form method=post target=page2.aspx");
else
response.write("<form method=post target=page1.aspx");
endif
Then, when writing out your textboxes and other input forms, you can check
to see if ispostback = true and it it is, you can populate the value
appropriately from the request object.
</form
Just a thought,
Chris
-------
>From: roger_beniot@.yahoo.com (roger beniot)
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>Subject: newbie navigation/form re-draw issue...
>Date: 6 Apr 2004 12:12:53 -0700
>Organization: http://groups.google.com
>Lines: 18
>Message-ID: <6c7aa9be.0404061112.30a2134f@.posting.google.com>
>NNTP-Posting-Host: 12.129.11.151
>Content-Type: text/plain; charset=ISO-8859-1
>Content-Transfer-Encoding: 8bit
>X-Trace: posting.google.com 1081278773 7573 127.0.0.1 (6 Apr 2004 19:12:53
GMT)
>X-Complaints-To: groups-abuse@.google.com
>NNTP-Posting-Date: Tue, 6 Apr 2004 19:12:53 +0000 (UTC)
>Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-onlin
e.de!news.glorb.com!postnews1.google.com!not-for-mail
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:224021
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>I'm trying to figure out how to do something in ASP.NET that used to
>be accomplished by doing a post from one page to another page.
>If a webform as fields for user information (address, name, phone,
>etc) and a submit button... What is the best way in asp.net to
>re-display the information and ask the user to verify the info is
>correct.
>Will I do a post back to the same webform, remove the previous web
>server controls and redraw the page w/ the new information?
>Would it be best to transfer to a new page (via Response.Redirect
>(url) or Server.Transfer (url)) and get the information from the first
>webform?
>
>thanks,
>roger
0 comments:
Post a Comment