Solved

Navigation and Viewstate Between 2 Forms in ASP.Net

Posted on 2004-08-25
3
268 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 20 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 65 total points
ID: 11892782
Server.Transfer("page2.aspx") will make all of form1 available to form2.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video discusses moving either the default database or any database to a new volume.

762 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now