473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 1869
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Doru Roman | last post by:
Hi, I have a page that calls a multiple frames page (ASP). I need to send parameters from the first to the multi frames page. If sending to a simple page, it works. If sending to multiple frames...
1
by: Jon Maz | last post by:
Hi, I am trying to pass an array from an asp page (JScript) to a dotnet web service using the SOAP Toolkit 3.0. This is still at the Hello World stage, as you can see: WEB SERVICE METHOD ...
3
by: DCB | last post by:
Hello. I have an easy question, likely, that has me in a headspin. I have an include file to a frames based site that basically forces frames on the end user if they visit the site and hit a...
23
by: John | last post by:
Last year, I remember finding a web page describing how to pass the name of a file to another web page, and have that web page load that image file. Now, I can't find my record of that (it was...
7
by: Zlatko Matić | last post by:
Let's assume that we have a database on some SQL server (let it be MS SQL Server) and that we want to execute some parameterized query as a pass.through query. How can we pass parameters to the...
5
by: Apollo0130 | last post by:
hi, i want to pass a parameter (a string) between two forms. i have a Webform A (default.aspx) with a button and a Webform B (detail.aspx). i want to click the button and open the webform B with...
19
Atli
by: Atli | last post by:
Introduction At some point, all web developers will need to collect data from their users. In a dynamic web page, everything revolves around the users input, so knowing how to ask for and collect...
2
by: gumby | last post by:
I would like to call this stored procedure, but I am unable to pass parameters to the @Start and @End. Is thier a way to pass parameters to a pass through query from MS Access? SELECT ...
12
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.