By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,526 Members | 1,895 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,526 IT Pros & Developers. It's quick & easy.

Pass variable to another page

P: n/a
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.
Mar 1 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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.


Mar 1 '06 #2

P: n/a
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" <wa**@NOequanimitySPAM.nl> wrote in message
news:44**********************@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.

Mar 1 '06 #3

P: n/a
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" <bm******@email.com> wrote in message
news:%2****************@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" <wa**@NOequanimitySPAM.nl> wrote in message
news:44**********************@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.

Mar 2 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.