473,325 Members | 2,771 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,325 software developers and data experts.

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.NETFrameworkSDKv1.1/cpguidenf/html/cpconpassingservercontrolva
luesbetweenpages.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 1506
e

"Melissa" <mw*****@visualstatement.com> wrote in message
news:Oq*************@TK2MSFTNGP10.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.Redirect. 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.Redirect 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*****@visualstatement.com> wrote in message
news:Oq*************@TK2MSFTNGP10.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.NETFrameworkSDKv1.1/cpguidenf/html/cpconpassingservercontrolva luesbetweenpages.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
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...
5
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...
0
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. ...
4
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...
9
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...
5
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...
11
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...
8
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...
4
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.