473,769 Members | 4,909 Online
Bytes | Software Development & Data Engineering Community
+ 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.QuerySt ring["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.redire ct, 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 2022
ndario,

you have to use response.redire ct when sending values in querystring

/Lasse
"ndario" <da******@hotma il.com> wrote in message
news:be******** *************** ***@posting.goo gle.com...
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.QuerySt ring["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.redire ct, 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.Redire ct. 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******@hotma il.com> wrote in message
news:be******** *************** ***@posting.goo gle.com...
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.QuerySt ring["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.redire ct, 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
1907
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 XMLRPCServer.py I created my own version by adding my getdirs function and then I call the code to open the server: import os import os.path import SimpleXMLRPCServer import xmlrpclib
15
4328
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 refreshing the page. I know I could write a form, submit it and go to another page. I've searched the web and I see something about HTTP Status code of 204
5
7829
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 to the Item page "ViewItem.aspx" with a simple : Server.Transfer("ViewItem.aspx"); I'd like to pass another HTTP parameter so that in the "ViewItem.aspx" page,
4
2903
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 - uses GET method. However I have to open remote server page using POST method. Normally this can be achieved using <form ACTION="remote-page-url"> tag. However this is impossible with ASP.NET. Also, using WebRequest class is not good solution, as I...
4
2163
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 page, but when I click it and redirect via Server.Transfer (using both values for preserveForm), the first time, it loads up BasicReports again. If I click BasicReports *again*, then it transfers to the correct page. Is there a known behavior/bug...
2
1868
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 method. Also enableViewStateMac is made false in the destination page. Still I cannot get some changed values. The scenario is such - 1. I have page 1 with a hidden variable named,"myHid" whose value is set to "Text1" 2. When a submit happens on...
18
2303
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 JPG files. The problem as I see it - if you know the name of the file, you could download it off the server (currently we are using an HTTP/Get but I'm going to be using WebClient in the new version.) If there any way to password protect the...
1
2555
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 - Server.Transfer("/Site/Template.aspx", true) - to a template page which displays the database related content. The Template page knows it's content because the page does exist in the SQL sitemap provider. The problem comes in with a button on...
7
16921
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 line 522 and the code is: <?php /* $Id: email.php,v 1.12 2003/06/17 17:29:44 dgw_ Exp $
0
9586
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10210
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10043
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9990
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9861
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5298
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3956
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 we have to send another system
2
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.