Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieving the value or property
Message
 
To
26/12/2002 05:45:29
Larry Santos
Local Data System
Philippines
General information
Forum:
ASP.NET
Category:
Web forms
Miscellaneous
Thread ID:
00735795
Message ID:
00735872
Views:
12
Hi Larry,

You can pass the information two different ways in ASP.NET.

First you can use the Session object to pass the info. In Page2 you would save the info into a Session variable. In Page 1 you would use the session variable.

in Page 2:
Session["MyString"] = "my string contents";
in Page 1:
string YourString = Session["MyString"];
if (Session["MyString"] != null)
{
	string Page2str = (string)Session["MyString"];
	// code to process the value of the string here
}
The other approach is to use a querystring when calling Page 1 from Page 2. This can only be done when the string would always be less than 255 characters.

in Page 2:
//set the URL string to call for Page 1
string Page1url = "Page1.aspx?mystring=" + "your string contents";
in Page 1:
string Page2str = Request.QueryString(["mystring"]);
>Hi,
>
>ff:
>
>Page1.aspx --> is my main PAGE
>
>Page2.aspx --> the popup web form...
> --> has a public property of STRNAME AS STRING
>
>i want to retrieve the value of Page2.aspx from Page2.aspx after the window close of Page2.aspx..
>
>
>TIA
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform