473,385 Members | 1,712 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,385 software developers and data experts.

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="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name=vs_defaultClientScript content="JavaScript">
<meta name=vs_targetSchema
content="http://schemas.microsoft.com/intellisense/ie5">
</head>
<body MS_POSITIONING="GridLayout">
<Form method="POST" name="ScheduleApptForm" id="ScheduleApptForm"
runat="server">
This is Test Control display content!!!! Result : <%=_result%>
<br>
<asp:Button class="ScheduleApptFormSubmit" 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_BeginRequest
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 1850
I think you have misunderstood what Server.Transfer does. Based on what you
have said, I would recommend using Response.Redirect instead. For more
details, try visiting the following site:

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

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

"Alex" <Al**@discussions.microsoft.com> wrote in message
news:17**********************************@microsof t.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="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name=vs_defaultClientScript content="JavaScript">
<meta name=vs_targetSchema
content="http://schemas.microsoft.com/intellisense/ie5">
</head>
<body MS_POSITIONING="GridLayout">
<Form method="POST" name="ScheduleApptForm" id="ScheduleApptForm"
runat="server">
This is Test Control display content!!!! Result : <%=_result%>
<br>
<asp:Button class="ScheduleApptFormSubmit" 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_BeginRequest
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.Redirect 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.microsoft.com/default.aspx?scid=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.Redirect instead. For more
details, try visiting the following site:

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

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

"Alex" <Al**@discussions.microsoft.com> wrote in message
news:17**********************************@microsof t.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="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name=vs_defaultClientScript content="JavaScript">
<meta name=vs_targetSchema
content="http://schemas.microsoft.com/intellisense/ie5">
</head>
<body MS_POSITIONING="GridLayout">
<Form method="POST" name="ScheduleApptForm" id="ScheduleApptForm"
runat="server">
This is Test Control display content!!!! Result : <%=_result%>
<br>
<asp:Button class="ScheduleApptFormSubmit" 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_BeginRequest
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
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...
9
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...
2
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...
5
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...
7
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...
2
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...
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: 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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.