Solved

Navigation and Viewstate Between 2 Forms in ASP.Net

Posted on 2004-08-25
3
276 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Leverage browser caching 2 55
Classic ASP - cannot find folder on the server 5 31
Response.Flush in Classic ASP causing TIME_WAIT ports 9 83
Time/Date Query 11 37
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…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
A short film showing how OnPage and Connectwise integration works.
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

930 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

8 Experts available now in Live!

Get 1:1 Help Now