473,748 Members | 7,827 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Server.Transfer Does Not Invoke IsPostBack in .NET Framework 1.1

Hello,

Quick question and I would really appreciate if anybody could helps me.
Here are the steps to reproduce the problem. Create simple ASP.Net
application. In code behind added protected class variable:

protected string _result = "No result";

Page Load event has:

if (IsPostBack)
_result = "Posted back";
else
_result = "Loaded";

Form has the following code:

<html>
<head>
<title>WebForm1 </title>
<meta name="GENERATOR " Content="Micros oft Visual Studio .NET 7.1">
<meta name="CODE_LANG UAGE" Content="C#">
<meta name=vs_default ClientScript content="JavaSc ript">
<meta name=vs_targetS chema
content="http://schemas.microso ft.com/intellisense/ie5">
</head>
<body MS_POSITIONING= "GridLayout ">
<Form method="POST" name="ScheduleA pptForm" id="ScheduleApp tForm"
runat="server">
This is Test Control display content!!!! Result : <%=_result%>
<br>
<asp:Button class="Schedule ApptFormSubmit" id="_btnSend"
runat="server" Height="21" text="Schedule Your Appointment"
TabIndex="18"></asp:Button></TD>
</Form>
</body>
</html>

Everything works fine until I have added in Global, Application_Beg inRequest
following code:

Server.Transfer ("WebForm1.aspx "); // or any other form name. Just trying to
transfer form to itself.

And that’s it. IsPostBack returns incorrect value. This issue definitely the
one mentioned in
http://support.microsoft.com/default...b;EN-US;821758 and should be
fixed two years ago. I have reinstalled Microsoft .NET Framework 1.1 Service
Pack 1. It doesn’t help. Any idea or suggestion of what I did wrong? Does it
mean that Service Pack installed incorectly?

Regards,
Alex.
Dec 23 '05 #1
2 1873
I think you have misunderstood what Server.Transfer does. Based on what you
have said, I would recommend using Response.Redire ct instead. For more
details, try visiting the following site:

http://www.developer.com/net/asp/article.php/3299641

Good Luck!
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

"Alex" <Al**@discussio ns.microsoft.co m> wrote in message
news:17******** *************** ***********@mic rosoft.com...
Hello,

Quick question and I would really appreciate if anybody could helps me.
Here are the steps to reproduce the problem. Create simple ASP.Net
application. In code behind added protected class variable:

protected string _result = "No result";

Page Load event has:

if (IsPostBack)
_result = "Posted back";
else
_result = "Loaded";

Form has the following code:

<html>
<head>
<title>WebForm1 </title>
<meta name="GENERATOR " Content="Micros oft Visual Studio .NET 7.1">
<meta name="CODE_LANG UAGE" Content="C#">
<meta name=vs_default ClientScript content="JavaSc ript">
<meta name=vs_targetS chema
content="http://schemas.microso ft.com/intellisense/ie5">
</head>
<body MS_POSITIONING= "GridLayout ">
<Form method="POST" name="ScheduleA pptForm" id="ScheduleApp tForm"
runat="server">
This is Test Control display content!!!! Result : <%=_result%>
<br>
<asp:Button class="Schedule ApptFormSubmit" id="_btnSend"
runat="server" Height="21" text="Schedule Your Appointment"
TabIndex="18"></asp:Button></TD>
</Form>
</body>
</html>

Everything works fine until I have added in Global,
Application_Beg inRequest
following code:

Server.Transfer ("WebForm1.aspx "); // or any other form name. Just trying
to
transfer form to itself.

And that's it. IsPostBack returns incorrect value. This issue definitely
the
one mentioned in
http://support.microsoft.com/default...b;EN-US;821758 and should
be
fixed two years ago. I have reinstalled Microsoft .NET Framework 1.1
Service
Pack 1. It doesn't help. Any idea or suggestion of what I did wrong? Does
it
mean that Service Pack installed incorectly?

Regards,
Alex.

Dec 24 '05 #2
Hello Nathan,

Thanks for the replay :-). I know what Server.Transfer does and what
Response.Redire ct does. I don’t need to redirect my request to new URL (by
301, 302 or any other reason). I just want the different pages handle
different requests based on parameters on SERVER SIDE. Client (browser)
should not be aware of this internal process. (I.E. supporting such
functionality as ‘skins’ as so on). But any way, my question is not why I
have to use Server.Transfer . The question is why IsPostBack is not
initialized correctly after Server.Transfer call, but should be accordingly
to 'http://support.microso ft.com/default.aspx?sc id=kb;EN-US;821758'.
By the way I have reinstalled Microsoft .NET Framework 1.1 Service Pack 1
twise. (that hot fix is included in Servise Pack)

Thanks for the attempt to help.

Regards,
Alex.
"Nathan Sokalski" wrote:
I think you have misunderstood what Server.Transfer does. Based on what you
have said, I would recommend using Response.Redire ct instead. For more
details, try visiting the following site:

http://www.developer.com/net/asp/article.php/3299641

Good Luck!
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

"Alex" <Al**@discussio ns.microsoft.co m> wrote in message
news:17******** *************** ***********@mic rosoft.com...
Hello,

Quick question and I would really appreciate if anybody could helps me.
Here are the steps to reproduce the problem. Create simple ASP.Net
application. In code behind added protected class variable:

protected string _result = "No result";

Page Load event has:

if (IsPostBack)
_result = "Posted back";
else
_result = "Loaded";

Form has the following code:

<html>
<head>
<title>WebForm1 </title>
<meta name="GENERATOR " Content="Micros oft Visual Studio .NET 7.1">
<meta name="CODE_LANG UAGE" Content="C#">
<meta name=vs_default ClientScript content="JavaSc ript">
<meta name=vs_targetS chema
content="http://schemas.microso ft.com/intellisense/ie5">
</head>
<body MS_POSITIONING= "GridLayout ">
<Form method="POST" name="ScheduleA pptForm" id="ScheduleApp tForm"
runat="server">
This is Test Control display content!!!! Result : <%=_result%>
<br>
<asp:Button class="Schedule ApptFormSubmit" id="_btnSend"
runat="server" Height="21" text="Schedule Your Appointment"
TabIndex="18"></asp:Button></TD>
</Form>
</body>
</html>

Everything works fine until I have added in Global,
Application_Beg inRequest
following code:

Server.Transfer ("WebForm1.aspx "); // or any other form name. Just trying
to
transfer form to itself.

And that's it. IsPostBack returns incorrect value. This issue definitely
the
one mentioned in
http://support.microsoft.com/default...b;EN-US;821758 and should
be
fixed two years ago. I have reinstalled Microsoft .NET Framework 1.1
Service
Pack 1. It doesn't help. Any idea or suggestion of what I did wrong? Does
it
mean that Service Pack installed incorectly?

Regards,
Alex.


Dec 24 '05 #3

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

Similar topics

4
3258
by: Bratislav Jevtic | last post by:
hi, ASP.NET, framework 1.0, patch 2, Windows 2000 server is this possible: from server side to say "go back" to browser? ------------------- scenario: I've got some page with a list. When one clicks some button goes to "detail" page - for to add/update data. That form may have number of postbacks. On
9
647
by: Steve Buster | last post by:
All right, I have read every forum, newsgroup etc about this issue and no one seems to know how to fix it. I am getting a "Server Application Unavailable" exception running my .NET 1.1 application. I use W2K SP4 and have applied the hot Fix KB824146 and KB824105, both IE fixes. I don't have VS installed because this is a Quality Environment. I do have .NET SDK and .NET 1.1 Runtime installed. I can't change my APSNET user to run as...
2
3217
by: Mr Wizard | last post by:
I am going through the front controller http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpatterns/html/ImpFrontControllerInASP.asp and all works well except when the server.transfer occurs. I get invalid IsPostBack results which I believe can fixed using the patch in KB:821156. How do I get this patch? Another question in the same pattern is when using LoadConrol to load a .ascx file I get "maps to another application,...
5
3757
by: Nedu N | last post by:
Hi All, I am facing a typical problem in my .NET application with the pop-up script messages. The thing is that its working fine when i run on my development machine but not running in expected manner when i move it to Prod environment. Please have a look at the following code snippet... //Page name - Add.aspx private void Page_Load(object sender, System.EventArgs e)
7
1501
by: Wayne Taylor | last post by:
Hello All I have built an ASP.NET web application using VS2003 and v1.1 of the framework. On my development system, Windows XP SP1a, all works well. When I transfer the application to Windows 2000 Server (v1.1 of the framework) the application breaks. I am using "Deploying a Web Solution" walkthrough from VS on-line help to install the app onto the 2k server and that seems to work fine on both the
2
3376
by: Pete | last post by:
Hi all... I sincerly hope one of the MS guys can clear this up for me... First some background... Ok, I have a web site which is fully translatable into several languages. All the strings for the web site are held in a database and all the labels, buttons etc are populated at run time in the Page_Load handler. The retreval of the strings from the database is all
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
3898
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
2311
by: ewolfman | last post by:
Hi, This may sound a little complicated, but here goes: I have 2 webforms (lets call them 'x' and 'y'). * - 'x' is a form which contains a single server side TextBox web control, and an iframe. The iframe's src attribute references the 'y' webform.
0
8826
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
9534
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
9241
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
8239
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
6793
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
6073
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
4867
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3303
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
2777
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.