Solved

Navigation and Viewstate Between 2 Forms in ASP.Net

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Update table value with join syntax 2 78
ASP SQL Syntax Duplicate Key 7 110
Change visitor's REMOTE_ADDR to server's REMOTE_ADDR 2 39
age from date of birth 4 52
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
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/…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

820 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