473,466 Members | 1,388 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Server.Transfer with params???

i am trying to transfer a user to another page with Server.Transfer()
but i am having a problem with sending query params like this

Server.Transfer("newPage.aspx?param=value");

in the PageLoad method of the newPage.aspx.cs,
Request.QueryString["param"] is allways null. is there any way to
transfer to another page, but to recive a param on the another page. i
even try with response.redirect, but it doesn't help. also, puting
value in the session wasn't visible in the newPage.

am i doing something wrong?
Nov 18 '05 #1
2 2002
ndario,

you have to use response.redirect when sending values in querystring

/Lasse
"ndario" <da******@hotmail.com> wrote in message
news:be**************************@posting.google.c om...
i am trying to transfer a user to another page with Server.Transfer()
but i am having a problem with sending query params like this

Server.Transfer("newPage.aspx?param=value");

in the PageLoad method of the newPage.aspx.cs,
Request.QueryString["param"] is allways null. is there any way to
transfer to another page, but to recive a param on the another page. i
even try with response.redirect, but it doesn't help. also, puting
value in the session wasn't visible in the newPage.

am i doing something wrong?

Nov 18 '05 #2
Server.Transfer transfers control of the current thread to another Page
class. It is not the same as Response.Redirect. where a header is sent to
the client instructing it to request a different URL. It is a server-side
invocation of another Page class, via it's location. In other words, you can
use a QueryString to pass data to the next Page.

HOWEVER, the current HttpContext is passed to the new Page class along with
the thread of execution. So, you can put any data you want into the Context
object prior to tranferring control, and it will be available to the called
Page class.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"ndario" <da******@hotmail.com> wrote in message
news:be**************************@posting.google.c om...
i am trying to transfer a user to another page with Server.Transfer()
but i am having a problem with sending query params like this

Server.Transfer("newPage.aspx?param=value");

in the PageLoad method of the newPage.aspx.cs,
Request.QueryString["param"] is allways null. is there any way to
transfer to another page, but to recive a param on the another page. i
even try with response.redirect, but it doesn't help. also, puting
value in the session wasn't visible in the newPage.

am i doing something wrong?

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jason Kratz | last post by:
After figuring out the other day (thanks to everyone here who helped) how to get the dir lists I want on my unix machine I want to turn the same thing into an XML-RPC service. Using Simple...
15
by: wk6pack | last post by:
Hi, I have a problem and not quite how to go about solving it. I have a form written in asp. I wish to submit the form and have the server return back to the same page without actually...
5
by: Julien C. | last post by:
Hi all, I have an "EditeItem.aspx" page which lets me edit properties of an "Item". In the OnClick() event of my Save button, I do save Item changes to the database and then I redirect the user...
4
by: Piotr Strycharz | last post by:
Hi all I do have a problem. How can I transfer user to another server using POST. The problem is that Server.Transfer (preserves form data) works just in current server. Response.Redirect -...
4
by: Keith Patrick | last post by:
I have an app where a Shockwave splash animation starts off my app and then sets its parent iframe's src to the value of a default page "BasicReports". BasicReports has a link to another report...
2
by: P K | last post by:
I am using server.transfer for a website being developed in vs.net 2005 And I need to get the posted values after server.transfer. For this I set the second parameter "true" in the transfer...
18
by: UJ | last post by:
Folks, We provide custom content for our customers. Currently we put the files on our server and people have a program we provide that will download the files. These files are usually SWF, HTML or...
1
by: michael.neel | last post by:
Here is the setup: I have an SQL driven sitemap provider - when the user clicks on a database generated link - /Site/DBPages/Article1.aspx - a handler does a Server.Transfer -...
7
by: mukeshrasm | last post by:
Hi I am no able to send mail and it is giving this error Warning: mail(): SMTP server response: 530 5.7.3 Client was not authenticated in c:\inetpub\wwwroot\eshop\includes\classes\email.php on...
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
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,...
1
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.