469,898 Members | 1,545 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

How to pass simple parameters to a page

I know I can use the querystring mechanism to pass simple parameters to a
Page using Response.Redirect, but Im having problems getting this to work
using Server.Transfer or Server.Execute - is this by design ?

What is a simple alternative for passing optional parameters to a Page using
Server.Transfer or Server.Execute?

I don't want to store a session variable and check that in the called page -
too flaky.
Nov 18 '05 #1
3 1756
Last I knew you cant pass a querystring through on server.transfer/execute
"JezB" <je***********@blueyonder.co.uk> wrote in message
news:eu**************@TK2MSFTNGP12.phx.gbl...
I know I can use the querystring mechanism to pass simple parameters to a
Page using Response.Redirect, but Im having problems getting this to work
using Server.Transfer or Server.Execute - is this by design ?

What is a simple alternative for passing optional parameters to a Page using Server.Transfer or Server.Execute?

I don't want to store a session variable and check that in the called page - too flaky.

Nov 18 '05 #2
I'm using Request.Params["param"] to interrogate the query string. Now, I
read somewhere that a Server.Transfer inherits the Request object from it's
calling form, rather than getting it's own, so that might be why I'm having
a problem.

"MattC" <m@m.com> wrote in message
news:eT**************@TK2MSFTNGP11.phx.gbl...
Last I knew you cant pass a querystring through on server.transfer/execute
"JezB" <je***********@blueyonder.co.uk> wrote in message
news:eu**************@TK2MSFTNGP12.phx.gbl...
I know I can use the querystring mechanism to pass simple parameters to a Page using Response.Redirect, but Im having problems getting this to work using Server.Transfer or Server.Execute - is this by design ?

What is a simple alternative for passing optional parameters to a Page

using
Server.Transfer or Server.Execute?

I don't want to store a session variable and check that in the called

page -
too flaky.


Nov 18 '05 #3
Assuming you make a Server.Transfer from the Page1 to Page2
you can access Page1 from Page2 like this:
Page1 page1 = (Page1)Context.Handler;
in Page2. And so you can access the fields from the Page1:
page1.anypublicfield etc
much better then the query string I think.

--
bl********@as.ro
www.bloomfield.as.ro

JezB wrote:
I'm using Request.Params["param"] to interrogate the query string. Now, I
read somewhere that a Server.Transfer inherits the Request object from it's
calling form, rather than getting it's own, so that might be why I'm having
a problem.

"MattC" <m@m.com> wrote in message
news:eT**************@TK2MSFTNGP11.phx.gbl...
Last I knew you cant pass a querystring through on server.transfer/execute
"JezB" <je***********@blueyonder.co.uk> wrote in message
news:eu**************@TK2MSFTNGP12.phx.gbl...
I know I can use the querystring mechanism to pass simple parameters to
a
Page using Response.Redirect, but Im having problems getting this to
work
using Server.Transfer or Server.Execute - is this by design ?

What is a simple alternative for passing optional parameters to a Page


using
Server.Transfer or Server.Execute?

I don't want to store a session variable and check that in the called


page -
too flaky.



Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Zlatko Matić | last post: by
5 posts views Thread by Apollo0130 | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.