Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Navigation and Viewstate Between 2 Forms in ASP.Net

Posted on 2004-08-25
3
Medium Priority
?
323 Views
Last Modified: 2008-02-26
I have a form that postbacks to itself.  Once all the data is valid I want it to go to another form.  This form will take data that was put into the first form and use the parameters to create a datagrid.

Response.Redirect doesn't appear to save the post data from the form.
0
Comment
Question by:danceswithwolves
3 Comments
 
LVL 1

Assisted Solution

by:McSqueeb
McSqueeb earned 80 total points
ID: 11892395
hmm do you use ASP error checking?

You could do the following

SomeField = Request.Form("txtSomeField")

IF SomeField = "" THEN
   Response.Write "error field cant remain blank"
ELSE
  Response.Redirect "somepage.asp?TID=" & SomeField
END IF

ie you create a record of the fields and if they all come back clear you add them to your querystring

then when it comes to the next page you  request.querystring("TID") to retrieve the data.
0
 

Author Comment

by:danceswithwolves
ID: 11892774
rewriting everything as a querystring seems a bit extreme...

should I really have to write everything twice like that?
0
 
LVL 7

Accepted Solution

by:
mantarae earned 260 total points
ID: 11892782
Server.Transfer("page2.aspx") will make all of form1 available to form2.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question