• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 325
  • Last Modified:

Navigation and Viewstate Between 2 Forms in ASP.Net

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
danceswithwolves
Asked:
danceswithwolves
2 Solutions
 
McSqueebCommented:
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
 
danceswithwolvesAuthor Commented:
rewriting everything as a querystring seems a bit extreme...

should I really have to write everything twice like that?
0
 
mantaraeCommented:
Server.Transfer("page2.aspx") will make all of form1 available to form2.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now