473,769 Members | 3,350 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Questions about Server.Transfer

I'm learning about Server.Transfer to see if it will be worthwhile so we can
cut down on the number of session variables we use. And in doing a couple
of tests following the .NET Framework SDK documentation
(ms-help://MS.NETFramework SDKv1.1/cpguidenf/html/cpconpassingser vercontrolva
luesbetweenpage s.htm), the example shows having the textbox controls as
Protected, but when I tried to run the example and access the values in the
text boxes from the first page on the second page, I wasn't able too because
it said that the controls were protected. I changed them to public and it
worked, but why does the example show that they can be protected?

Also, when I ran the example and clicked a button to go to the second page,
the browser's address bar had the address of the first page when I was on
the second page. I understand why that is, but does it have to be that way?
It would be less confusing if it showed the page that was actually being
run.

I appreciate any help.

Thanks,
--
Melissa Whalen, Programmer/Analyst
AIT, BBA/IS

Nov 17 '05 #1
2 1525
e

"Melissa" <mw*****@visual statement.com> wrote in message
news:Oq******** *****@TK2MSFTNG P10.phx.gbl...
Protected, but when I tried to run the example and access the values in the text boxes from the first page on the second page, I wasn't able too because it said that the controls were protected. I changed them to public and it
worked, but why does the example show that they can be protected?
No idea. Typo?
Also, when I ran the example and clicked a button to go to the second page, the browser's address bar had the address of the first page when I was on
the second page. I understand why that is, but does it have to be that way? It would be less confusing if it showed the page that was actually being
run.


The client browser is never notified of the server.transfer event; so it
still thinks it's looking at the original page it requested. The resulting
asynchronous situation can produce funky pathing issues, namely virtual
paths.
Nov 17 '05 #2
> Protected, but when I tried to run the example and access the values in
the
text boxes from the first page on the second page, I wasn't able too because it said that the controls were protected. I changed them to public and it
worked, but why does the example show that they can be protected
The example show using Protected Server Controls, but the class exposes
Public properties that return the values of the Protected controls.
Protected means that the properties are not exposed to any class that
doesn't inherit the class specified. That is why the Public properties are
used to expose the values in the Protected controls.
Also, when I ran the example and clicked a button to go to the second page, the browser's address bar had the address of the first page when I was on
the second page. I understand why that is, but does it have to be that way? It would be less confusing if it showed the page that was actually being
run.
If you want that, you will have to use Response.Redire ct. The address shown
in the browser's address window is the address of the URL that was
requested. Server.Transfer happens on the server side, not on the client.
Response.Redire ct sends a response header to the browser telling it to
request another URL.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Neither a follower nor a lender be.

"Melissa" <mw*****@visual statement.com> wrote in message
news:Oq******** *****@TK2MSFTNG P10.phx.gbl... I'm learning about Server.Transfer to see if it will be worthwhile so we can cut down on the number of session variables we use. And in doing a couple
of tests following the .NET Framework SDK documentation
(ms-help://MS.NETFramework SDKv1.1/cpguidenf/html/cpconpassingser vercontrolva luesbetweenpage s.htm), the example shows having the textbox controls as
Protected, but when I tried to run the example and access the values in the text boxes from the first page on the second page, I wasn't able too because it said that the controls were protected. I changed them to public and it
worked, but why does the example show that they can be protected?

Also, when I ran the example and clicked a button to go to the second page, the browser's address bar had the address of the first page when I was on
the second page. I understand why that is, but does it have to be that way? It would be less confusing if it showed the page that was actually being
run.

I appreciate any help.

Thanks,
--
Melissa Whalen, Programmer/Analyst
AIT, BBA/IS

Nov 17 '05 #3

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

Similar topics

2
3189
by: knoak | last post by:
Hi there, I've found a script at these great Google fora. a script to send emails with attachments. The script is below this message, name etc. aren't mine, but from the original post. My questions are: - Is this script extra heavy for a server, or should it be no problem?
5
2332
by: m3ckon | last post by:
Hi, I have some ASP questions which I wanted answering (have an interview comming up) 1) What is the difference between response.redirect and server.transfer 2) How can you deal with recodset paging using ASP? 3) What are the different locking type and cursors in ASP?
0
1692
by: Rob Cheshire | last post by:
Hi to all, I need some help deciding on the best database system for our specific application. OPTIONAL INFO: We currently have 2 separate projects that need to be updated from dos-based dBase. I'll only describe one of these but the other is comparable in size. The project currently has about 32 files. The 2 largest are about 30,000 records and 5 columns include data from the last 30 years. The other 30 files are created by year...
4
2116
by: Harsh Thakur | last post by:
Hi, I'd like to know the performance related differences between Response.Redirect and Server.Transfer. I'd like to redirect the user to a different page. I can either do a Response.Redirect("URL") or a Server.Transfer("URL"). So I'd like to find out which is more efficient/better. Can anyone please tell me or give any pointers to links on the web? Thanks & Regards
9
4614
by: Mark | last post by:
Hello I'm trying to use a Server.Transfer in a try-catch (I cannot put it outside the Try-Catch as it is nested deep within a component that is called in a try-catch loop) The problem is that the Server.Transfer always throws the ThreadAbortException. MSDN acknowledges that this is a unque exception that will be automatically rethrown - i.e. it can't be swallowed. Does anyone know if there is extar code I can write (maybe something in the...
5
2583
by: Guadala Harry | last post by:
I've been reading up on Server.Transfer as well as doing some testing, and it appears to always raise the ThreadAbortException error. On one hand I've read a bunch of promotional-type material touting the benefits of Server.Transfer and none of them mention ThreadAbortException - but the MSDN documentation says Server.Transfer will always cause that exception - by design - and that the work-around is to not use Server.Transfer (and to use...
11
6044
by: Alexander Bosch | last post by:
Hi, I'm having a problem similar to the one that's stated in this KB http://support.microsoft.com/default.aspx?scid=kb;en-us;839521 When I'm posting a page to itself with the bool value as true it falls into an infinite loop and later a StackOverflow Exception. I need to do this and not a Response.Redirect or a transfer with the bool in false. My problem is that this KB is saying that this problem should be solved with ServicePack 1 of...
8
3901
by: bryan | last post by:
I've got a custom HttpHandler to process all requests for a given extension. It gets invoked OK, but if I try to do a Server.Transfer I get an HttpException. A Response.Redirect works, but I really need to avoid the extra round-trip to the client. I've tried Passing the page name, the full URL, and the instance of the handler class to the Transfer method, but everything gets me the same error 500. Any help would be appreciated.
4
6066
by: shamirza | last post by:
4 9 6 18.ATLAS-AJAX Note: - As an IT professional it's useful to know what the difference is between Hype and usefulness. For instance if there is a new technology coming in many programmers just want to implement it because they want to learn it?. But any new technology becomes useful if it is useful to the user. And Ajax is one of the technologies which will be useful as it really
0
9590
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
9424
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
10223
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
8879
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
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
3968
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
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.