|
 |
aspx thread: It should be easy. (Parsing Arguments Between Aspx pages)
Message #1 by "Salvador Gallego" <salvito@h...> on Tue, 11 Jun 2002 18:05:04
|
|
I have doubts about how to pars the value of a variable between two aspx
pages, where one of this pages should be a form...
In example, if somebody writes something in a textbox from a form, a
procedure recives this info in another aspx page to manipulate it.
If you could give me a simple example...
Thanks a lot in advance.
Salvador Gallego.
Message #2 by "Greg Quinn" <greg@i...> on Wed, 12 Jun 2002 16:55:11 -0700
|
|
Hi Salvador,
I hope we are on the same track, but why do you need another aspx page to
manipulate the data? You can put all your manipulation functions on one page
now in ASP.NET, you don't need a response page anymore to handle the form
contents.
Though if you still wish to handle the variable on another page, you can do
something like this...
<script language = "vb" runat = "server">
Sub myFunction(Sender as Object, E as EventArgs)
Response.Redirect("myhandler.aspx?varValue=" & myBox.Text) ' go to
myhandler.aspx with the value of myBox passed into querystring
End Sub
</script>
<form id = "myForm" runat = "server">
<asp:textbox id = "myBox" runat = "server" />
<br>
<asp:button id = "myButton" text = "Click me" runat = "server" onClick
"myFunction" />
</form>
-----Original Message-----
From: Salvador Gallego [mailto:salvito@h...]
Sent: 11 June 2002 06:05
To: ASP+
Subject: [aspx] It should be easy. (Parsing Arguments Between Aspx
pages)
I have doubts about how to pars the value of a variable between two aspx
pages, where one of this pages should be a form...
In example, if somebody writes something in a textbox from a form, a
procedure recives this info in another aspx page to manipulate it.
If you could give me a simple example...
Thanks a lot in advance.
Salvador Gallego.
Message #3 by "Imar Spaanjaars" <Imar@S...> on Wed, 12 Jun 2002 17:18:09
|
|
Hi there,
Alternatively, you can expose your form fields on page 1 as public
properties available to page 2.
If you have Visual Studio.NET, check out the following link:
ms-
help://MS.NETFrameworkSDK/cpguidenf/html/cpconpassingservercontrolvaluesbe
tweenpages.htm
If you don't have VS.NET, check out this article which describes the same
concept:
http://www.aspalliance.com/kenc/passval.aspx
HtH
Imar
> Hi Salvador,
I hope we are on the same track, but why do you need another aspx page to
manipulate the data? You can put all your manipulation functions on one
page
now in ASP.NET, you don't need a response page anymore to handle the form
contents.
Though if you still wish to handle the variable on another page, you can
do
something like this...
<script language = "vb" runat = "server">
Sub myFunction(Sender as Object, E as EventArgs)
Response.Redirect("myhandler.aspx?varValue=" &
myBox.Text) ' go to
myhandler.aspx with the value of myBox passed into querystring
End Sub
</script>
<form id = "myForm" runat = "server">
<asp:textbox id = "myBox" runat = "server" />
<br>
<asp:button id = "myButton" text = "Click me" runat = "server"
onClick
"myFunction" />
</form>
-----Original Message-----
From: Salvador Gallego [mailto:salvito@h...]
Sent: 11 June 2002 06:05
To: ASP+
Subject: [aspx] It should be easy. (Parsing Arguments Between Aspx
pages)
I have doubts about how to pars the value of a variable between two aspx
pages, where one of this pages should be a form...
In example, if somebody writes something in a textbox from a form, a
procedure recives this info in another aspx page to manipulate it.
If you could give me a simple example...
Thanks a lot in advance.
Salvador Gallego.
Message #4 by "Salvador Gallego" <salvito@h...> on Thu, 13 Jun 2002 15:49:45
|
|
> Hi there,
> Alternatively, you can expose your form fields on page 1 as public
p> roperties available to page 2.
I> f you have Visual Studio.NET, check out the following link:
> ms-
h>
elp://MS.NETFrameworkSDK/cpguidenf/html/cpconpassingservercontrolvaluesbe
t> weenpages.htm
> If you don't have VS.NET, check out this article which describes the same
c> oncept:
h> ttp://www.aspalliance.com/kenc/passval.aspx
>
> HtH
>
I> mar
>
> > Hi Salvador,
> I hope we are on the same track, but why do you need another aspx page to
m> anipulate the data? You can put all your manipulation functions on one
p> age
n> ow in ASP.NET, you don't need a response page anymore to handle the form
c> ontents.
> Though if you still wish to handle the variable on another page, you can
d> o
s> omething like this...
> <script language = "vb" runat = "server">
> Sub myFunction(Sender as Object, E as EventArgs)
> Response.Redirect("myhandler.aspx?varValue=" &
m> yBox.Text) ' go to
m> yhandler.aspx with the value of myBox passed into querystring
> End Sub
<> /script>
> <form id = "myForm" runat = "server">
> <asp:textbox id = "myBox" runat = "server" />
> <br>
> <asp:button id = "myButton" text = "Click me" runat = "server"
o> nClick
"> myFunction" />
<> /form>
> -----Original Message-----
F> rom: Salvador Gallego [mailto:salvito@h...]
S> ent: 11 June 2002 06:05
T> o: ASP+
S> ubject: [aspx] It should be easy. (Parsing Arguments Between Aspx
p> ages)
>
I> have doubts about how to pars the value of a variable between two aspx
p> ages, where one of this pages should be a form...
> In example, if somebody writes something in a textbox from a form, a
p> rocedure recives this info in another aspx page to manipulate it.
> If you could give me a simple example...
> Thanks a lot in advance.
> Salvador Gallego.
Message #5 by "Salvador Gallego" <salvito@h...> on Thu, 13 Jun 2002 15:55:40
|
|
Sorry for the last post, I just pressed Intro too fast....
Aniway, thank's for both answers, very usefull, now my doubt is solved.
I'll add that this is probably the best forum about asp.net I found; As
you can see, in the spanish asp.net forum of this page, nobody use to
answer doubts!; This is my third doubt solved, so in the future when my
Knowledge becomes more extensive I'll answer lot of doubts for sure!
From Spain,
Salvador Gallego.
|
|
 |