Saturday, March 24, 2012

Pass variable to another page

I have a calendar form that sends the inputted date back to a text box .
Using the GET method, I would like to pass the date as a variable to another
asp page. How do I do this?
Thanks.Hi Marti,
Not sure if I understand your question. But in ASP.Net 2.0 you have to
ability to do cross-page positing. So you can just do a postback with
value of that textbox to your other page.
More info:
http://www.dotnetjohn.com/articles.aspx?articleid=176
http://msdn2.microsoft.com/en-us/library/ms178139.aspx
Ward Bekker
"Asp.Net Discussions for the Professional Developer"
http://www.dotnettaxi.com
"Free .Net 2.0 C# to/from VB.Net Code Converter"
http://www.dotnettaxi.com/Tools/Converter.aspx
Marti wrote:
> I have a calendar form that sends the inputted date back to a text box .
> Using the GET method, I would like to pass the date as a variable to anoth
er
> asp page. How do I do this?
> Thanks.
>
Ward,
Thanks - That's exactly what I was looking for. I was using a different
method to pass values. I have tried using the postback method but to no
avail. Below is the source page I am working with, can you tell me what I
should have on my target page?
Thanks.
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Cross Page PostBack</title>
</head>
<body>
<form name="form1" id="form1" runat="server">
<h3>Cross Page PostBack</h3>
Enter Search Term:
<asp:TextBox ID="SearchTerm" runat="server" />
<asp:Button ID="Button2" runat="server" Text="Search"
PostBackUrl="posttarget.aspx" />
<br />
</form>
</body>
</html>
"Ward Bekker" <ward@.NOequanimitySPAM.nl> wrote in message
news:4405fc87$0$2027$9a622dc7@.news.kpnplanet.nl...
Hi Marti,
Not sure if I understand your question. But in ASP.Net 2.0 you have to
ability to do cross-page positing. So you can just do a postback with
value of that textbox to your other page.
More info:
http://www.dotnetjohn.com/articles.aspx?articleid=176
http://msdn2.microsoft.com/en-us/library/ms178139.aspx
Ward Bekker
"Asp.Net Discussions for the Professional Developer"
http://www.dotnettaxi.com
"Free .Net 2.0 C# to/from VB.Net Code Converter"
http://www.dotnettaxi.com/Tools/Converter.aspx
Marti wrote:
> I have a calendar form that sends the inputted date back to a text box .
> Using the GET method, I would like to pass the date as a variable to
another
> asp page. How do I do this?
> Thanks.
>
Ok, I think I know out the code isn't working. Don't have 2.0 installed.
I'll install the 2.0 framework and give the crosspage post back a try..
"Martin" <bmquiroz@.email.com> wrote in message
news:%23ItZRAYPGHA.3460@.TK2MSFTNGP15.phx.gbl...
Ward,
Thanks - That's exactly what I was looking for. I was using a different
method to pass values. I have tried using the postback method but to no
avail. Below is the source page I am working with, can you tell me what I
should have on my target page?
Thanks.
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Cross Page PostBack</title>
</head>
<body>
<form name="form1" id="form1" runat="server">
<h3>Cross Page PostBack</h3>
Enter Search Term:
<asp:TextBox ID="SearchTerm" runat="server" />
<asp:Button ID="Button2" runat="server" Text="Search"
PostBackUrl="posttarget.aspx" />
<br />
</form>
</body>
</html>
"Ward Bekker" <ward@.NOequanimitySPAM.nl> wrote in message
news:4405fc87$0$2027$9a622dc7@.news.kpnplanet.nl...
Hi Marti,
Not sure if I understand your question. But in ASP.Net 2.0 you have to
ability to do cross-page positing. So you can just do a postback with
value of that textbox to your other page.
More info:
http://www.dotnetjohn.com/articles.aspx?articleid=176
http://msdn2.microsoft.com/en-us/library/ms178139.aspx
Ward Bekker
"Asp.Net Discussions for the Professional Developer"
http://www.dotnettaxi.com
"Free .Net 2.0 C# to/from VB.Net Code Converter"
http://www.dotnettaxi.com/Tools/Converter.aspx
Marti wrote:
> I have a calendar form that sends the inputted date back to a text box .
> Using the GET method, I would like to pass the date as a variable to
another
> asp page. How do I do this?
> Thanks.
>

0 comments:

Post a Comment