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

passing values between web forms pages

P: n/a
Does anyone having a working example of passing values
between web forms pages? I tried the example in the ms-
help but I can't get by the following:

To read property values from the source page in the call
page.
1. Create a global instance varible that is typed to the
class of the source page.
the sample provided

// c#
// Put immediately after the opening brace of the class
public class WebForm3 : System.Web.UI.Page
{ public WebForm1 sourcepage;

at this point it does not recognize WebForm3.

thanks
Nov 15 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
rick wrote:
Does anyone having a working example of passing values
between web forms pages?


You can send them along as part of the querystring or use Session variables.

--
There are 10 kinds of people. Those who understand binary and those who
don't.

http://code.acadx.com
(Pull the pin to reply)
Nov 15 '05 #2

P: n/a
I would recommend you read up on querystrings.

A simple search in google, will probably return hundreds.

-mike

"rick" <an*******@discussions.microsoft.com> wrote in message
news:01****************************@phx.gbl...
Does anyone having a working example of passing values
between web forms pages? I tried the example in the ms-
help but I can't get by the following:

To read property values from the source page in the call
page.
1. Create a global instance varible that is typed to the
class of the source page.
the sample provided

// c#
// Put immediately after the opening brace of the class
public class WebForm3 : System.Web.UI.Page
{ public WebForm1 sourcepage;

at this point it does not recognize WebForm3.

thanks

Nov 15 '05 #3

P: n/a
If you want all of your pages to be able to access some data, then Session
variables will probably work for you.

Do somethign like this

Session["YourData"] = ((int) Session["YourData"]) ;

You can declare your variable just like this:
Session["YourData"] = whatever;

And you can retrieve it like this

int i = ((int) Session["MyServiceUsage"]) + 1;

HTH,

Bill
"rick" <an*******@discussions.microsoft.com> wrote in message
news:01****************************@phx.gbl...
Does anyone having a working example of passing values
between web forms pages? I tried the example in the ms-
help but I can't get by the following:

To read property values from the source page in the call
page.
1. Create a global instance varible that is typed to the
class of the source page.
the sample provided

// c#
// Put immediately after the opening brace of the class
public class WebForm3 : System.Web.UI.Page
{ public WebForm1 sourcepage;

at this point it does not recognize WebForm3.

thanks

Nov 15 '05 #4

P: n/a
I am really trying to use the Transfer method of the
server object.

-----Original Message-----
Does anyone having a working example of passing values
between web forms pages? I tried the example in the ms-
help but I can't get by the following:

To read property values from the source page in the call
page.
1. Create a global instance varible that is typed to the
class of the source page.
the sample provided

// c#
// Put immediately after the opening brace of the class
public class WebForm3 : System.Web.UI.Page
{ public WebForm1 sourcepage;

at this point it does not recognize WebForm3.

thanks
.

Nov 15 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.