473,466 Members | 1,367 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how ASP.NET page gets user input from another ASP.NET page??

In ASP, if I have asppage.asp for GUI and aspprocess.asp for process
requests from database.

In asppage.asp code will be like:
<form action="aspprocess.asp" method="POST"> GUI CODE </form>

When the user clicks the submit button on asppage.asp, it will invoke
aspprocess.asp page

aspprocess.asp code can get the user input from asppage.asp by doing:
Request.Form("Control_ID")

In ASP.NET, if I want to achieve the same goal: if I have aspxpage.aspx for
GUI and aspxprocess.aspx for process requests from database

In aspxpage.aspx code will be like:
<form id="Form1" method="post" action="aspxprocess.aspx" runat="server"> GUI
CODE </form>

However, when the user clicks the submit button on aspxpage.aspx, it didn't
invoke aspxpage.aspx page at all, unless I do the the following:

Private Sub Submit1_ServerClick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Submit1.ServerClick
Response.Redirect("aspxprocess.aspx")
End Sub

But even now I am in aspxprocess.aspx page, how can I get the user input
from aspxpage.aspx??
Request.Form("Control_ID") no longer works.

Please advise!
Thanks!
Nov 18 '05 #1
2 2098
Try this?

http://authors.aspalliance.com/kenc/passval.aspx

"Matthew Louden" <ma*******@hotmail.com> wrote in message
news:ud**************@TK2MSFTNGP09.phx.gbl...
In ASP, if I have asppage.asp for GUI and aspprocess.asp for process
requests from database.

In asppage.asp code will be like:
<form action="aspprocess.asp" method="POST"> GUI CODE </form>

When the user clicks the submit button on asppage.asp, it will invoke
aspprocess.asp page

aspprocess.asp code can get the user input from asppage.asp by doing:
Request.Form("Control_ID")

In ASP.NET, if I want to achieve the same goal: if I have aspxpage.aspx for GUI and aspxprocess.aspx for process requests from database

In aspxpage.aspx code will be like:
<form id="Form1" method="post" action="aspxprocess.aspx" runat="server"> GUI CODE </form>

However, when the user clicks the submit button on aspxpage.aspx, it didn't invoke aspxpage.aspx page at all, unless I do the the following:

Private Sub Submit1_ServerClick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Submit1.ServerClick
Response.Redirect("aspxprocess.aspx")
End Sub

But even now I am in aspxprocess.aspx page, how can I get the user input
from aspxpage.aspx??
Request.Form("Control_ID") no longer works.

Please advise!
Thanks!

Nov 18 '05 #2
Setting the form action attribute just isn't the ASP.NET way.

Of course there are a number of ways to pass values from one page to
another, such as using the querystring, cookies, session,
context, saving to a temporary table in the database between each page, etc.
You'll have to decide which technique is best for your application.
Here are several good articles on the subject to help you decide.
http://msdn.microsoft.com/msdnmag/is...e/default.aspx

http://www.aspalliance.com/kenc/passval.aspx

http://www.dotnetjunkies.com/tutoria...tutorialid=600

http://www.dotnetbips.com/displayarticle.aspx?id=79

Here's one nice, simple way to pass values from one page to another:

'Add data to the context object before transferring
Context.Items("myParameter") = x
Server.Transfer("WebForm2.aspx")

Then, in WebForm2.aspx:

'Grab data from the context property
Dim x as Integer = CType(Context.Items("myParameter"),Integer)

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"Matthew Louden" <ma*******@hotmail.com> wrote in message
news:ud**************@TK2MSFTNGP09.phx.gbl...
In ASP, if I have asppage.asp for GUI and aspprocess.asp for process
requests from database.

In asppage.asp code will be like:
<form action="aspprocess.asp" method="POST"> GUI CODE </form>

When the user clicks the submit button on asppage.asp, it will invoke
aspprocess.asp page

aspprocess.asp code can get the user input from asppage.asp by doing:
Request.Form("Control_ID")

In ASP.NET, if I want to achieve the same goal: if I have aspxpage.aspx for GUI and aspxprocess.aspx for process requests from database

In aspxpage.aspx code will be like:
<form id="Form1" method="post" action="aspxprocess.aspx" runat="server"> GUI CODE </form>

However, when the user clicks the submit button on aspxpage.aspx, it didn't invoke aspxpage.aspx page at all, unless I do the the following:

Private Sub Submit1_ServerClick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Submit1.ServerClick
Response.Redirect("aspxprocess.aspx")
End Sub

But even now I am in aspxprocess.aspx page, how can I get the user input
from aspxpage.aspx??
Request.Form("Control_ID") no longer works.

Please advise!
Thanks!

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Daniel Walzenbach | last post by:
Hi I am faced with the following problem: I have a page (let’s call this page page1.aspx) containing some TextBoxes and a hyperlink which opens another page (let’s call this page page2.aspx)...
2
by: John Lau | last post by:
Hi, Is there documentation that talks about the page lifecycle, the lifecycle of controls on the page, and the rendering of inline code, in a single document? Thanks, John
9
by: tshad | last post by:
This is from my previous post, but a different issue. I have the following Javascript routine that opens a popup page, but doesn't seem to work if called from an asp.net button. It seems to work...
5
by: ramendra | last post by:
how to refresh a image control to pick up the latest image file on a asp.net page. i am generating a image based on the input from the user and displaying it on the page through image control. The...
11
by: Peter Fox | last post by:
A FAQ here goes something like "How can I get input from the middle of my form sent processed to PHP and the result returned to the page?" The standard answer is "You can't because PHP is server...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
1
by: Curious Trigger | last post by:
Hi there, programming with Visual Studio 2005 and ASP.NET 2.0 I want to open a modal dialog from Default.aspx. I searched the net and many newsgroups but I couldn't find any solution. First I...
4
by: sass | last post by:
Hi! this must be a stupid question, but bare with me - I just started learning html! My problem: I have several html pages that use forms to collect user input. On each page, submitting the...
1
by: raghuvendra | last post by:
Hi I have a jsp page with 4 columns: namely Category name , Category order, Input field and a submit button. All these are aligned in a row. And Each Category Name has its corresponding Category...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.