473,732 Members | 2,204 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Make Server.Transfer Postback

Is there a way to make a page at the receiving end of a Server.Transfer
think that the request is a Postback? (When I say "think it is a Postback,"
I mean I want the page to go through the ENTIRE event sequence for a
postback, including LoadViewState, ProcessPostData , etc.) Even when
Sever.Transfer transfers a page to itself (i.e., Page A.aspx contains
Server.Transfer ("A.apsx")) the request is seen as a first-time request, not
a Postback. Is there some way to fool/force the page into thinking the
request is a Postback and run through the entire event gambit, whether it is
from the same page or not?

To answer the inevitable question, "Why?" I have the following flow in my
application:

a.apsx -> b.aspx -> a.aspx

where b.aspx Server.Transfer s to a.aspx. Upon return to a.aspx, I want the
form to pick up where it left off, so that the little side trip to b.aspx
doesn't interrupt the user experience.

Thanks,
--kaburke
Nov 19 '05 #1
7 3316
Alternatively, is there some way to force execution of the entire event
sequence (LoadViewState, ProcessPostData , etc.) even when the request is not
a Postback?

Thanks,
--kaburke

"kaburke" <ph**********@h otmail.com> wrote in message
news:YK%Me.2020 06$tt5.82500@ed tnps90...
Is there a way to make a page at the receiving end of a Server.Transfer
think that the request is a Postback? (When I say "think it is a
Postback," I mean I want the page to go through the ENTIRE event sequence
for a postback, including LoadViewState, ProcessPostData , etc.) Even when
Sever.Transfer transfers a page to itself (i.e., Page A.aspx contains
Server.Transfer ("A.apsx")) the request is seen as a first-time request,
not a Postback. Is there some way to fool/force the page into thinking the
request is a Postback and run through the entire event gambit, whether it
is from the same page or not?

To answer the inevitable question, "Why?" I have the following flow in my
application:

a.apsx -> b.aspx -> a.aspx

where b.aspx Server.Transfer s to a.aspx. Upon return to a.aspx, I want the
form to pick up where it left off, so that the little side trip to b.aspx
doesn't interrupt the user experience.

Thanks,
--kaburke

Nov 19 '05 #2
why dont you just server.execute page b passing the data it needs to b, that
way page a will wait for page b to complete

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"kaburke" <ph**********@h otmail.com> wrote in message
news:YK%Me.2020 06$tt5.82500@ed tnps90...
Is there a way to make a page at the receiving end of a Server.Transfer
think that the request is a Postback? (When I say "think it is a
Postback," I mean I want the page to go through the ENTIRE event sequence
for a postback, including LoadViewState, ProcessPostData , etc.) Even when
Sever.Transfer transfers a page to itself (i.e., Page A.aspx contains
Server.Transfer ("A.apsx")) the request is seen as a first-time request,
not a Postback. Is there some way to fool/force the page into thinking the
request is a Postback and run through the entire event gambit, whether it
is from the same page or not?

To answer the inevitable question, "Why?" I have the following flow in my
application:

a.apsx -> b.aspx -> a.aspx

where b.aspx Server.Transfer s to a.aspx. Upon return to a.aspx, I want the
form to pick up where it left off, so that the little side trip to b.aspx
doesn't interrupt the user experience.

Thanks,
--kaburke

Nov 19 '05 #3
Page b.aspx requires user interaction, so doesn't Server.Execute end up (in
this situation) behaving like Server.Transfer (i.e., isn't execution of
a.aspx ended when b.aspx is returned to client)?

Thanks,
--kaburke

"John Timney (ASP.NET MVP)" <ti*****@despam med.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
why dont you just server.execute page b passing the data it needs to b,
that way page a will wait for page b to complete

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"kaburke" <ph**********@h otmail.com> wrote in message
news:YK%Me.2020 06$tt5.82500@ed tnps90...
Is there a way to make a page at the receiving end of a Server.Transfer
think that the request is a Postback? (When I say "think it is a
Postback," I mean I want the page to go through the ENTIRE event sequence
for a postback, including LoadViewState, ProcessPostData , etc.) Even when
Sever.Transfer transfers a page to itself (i.e., Page A.aspx contains
Server.Transfer ("A.apsx")) the request is seen as a first-time request,
not a Postback. Is there some way to fool/force the page into thinking
the request is a Postback and run through the entire event gambit,
whether it is from the same page or not?

To answer the inevitable question, "Why?" I have the following flow in my
application:

a.apsx -> b.aspx -> a.aspx

where b.aspx Server.Transfer s to a.aspx. Upon return to a.aspx, I want
the form to pick up where it left off, so that the little side trip to
b.aspx doesn't interrupt the user experience.

Thanks,
--kaburke


Nov 19 '05 #4
Do you want b.aspx to run in the same browser window or in a different one?
In the latter case you could start another window on client side without any
postback in a.aspx.

Eliyahu

"kaburke" <ph**********@h otmail.com> wrote in message
news:YK%Me.2020 06$tt5.82500@ed tnps90...
Is there a way to make a page at the receiving end of a Server.Transfer
think that the request is a Postback? (When I say "think it is a Postback," I mean I want the page to go through the ENTIRE event sequence for a
postback, including LoadViewState, ProcessPostData , etc.) Even when
Sever.Transfer transfers a page to itself (i.e., Page A.aspx contains
Server.Transfer ("A.apsx")) the request is seen as a first-time request, not a Postback. Is there some way to fool/force the page into thinking the
request is a Postback and run through the entire event gambit, whether it is from the same page or not?

To answer the inevitable question, "Why?" I have the following flow in my
application:

a.apsx -> b.aspx -> a.aspx

where b.aspx Server.Transfer s to a.aspx. Upon return to a.aspx, I want the
form to pick up where it left off, so that the little side trip to b.aspx
doesn't interrupt the user experience.

Thanks,
--kaburke

Nov 19 '05 #5
The same window.

Thanks,
--kaburke

"Eliyahu Goldin" <re************ *@monarchmed.co m> wrote in message
news:Ou******** ******@TK2MSFTN GP12.phx.gbl...
Do you want b.aspx to run in the same browser window or in a different
one?
In the latter case you could start another window on client side without
any
postback in a.aspx.

Eliyahu

"kaburke" <ph**********@h otmail.com> wrote in message
news:YK%Me.2020 06$tt5.82500@ed tnps90...
Is there a way to make a page at the receiving end of a Server.Transfer
think that the request is a Postback? (When I say "think it is a

Postback,"
I mean I want the page to go through the ENTIRE event sequence for a
postback, including LoadViewState, ProcessPostData , etc.) Even when
Sever.Transfer transfers a page to itself (i.e., Page A.aspx contains
Server.Transfer ("A.apsx")) the request is seen as a first-time request,

not
a Postback. Is there some way to fool/force the page into thinking the
request is a Postback and run through the entire event gambit, whether it

is
from the same page or not?

To answer the inevitable question, "Why?" I have the following flow in my
application:

a.apsx -> b.aspx -> a.aspx

where b.aspx Server.Transfer s to a.aspx. Upon return to a.aspx, I want
the
form to pick up where it left off, so that the little side trip to b.aspx
doesn't interrupt the user experience.

Thanks,
--kaburke


Nov 19 '05 #6
I found the solution to my problem here:

http://www.codeproject.com/aspnet/Pe...tStatePage.asp

My situation was not identical to the scenario outlined in the article, but
the methods described where easily translated.

Thanks,
--kaburke

"kaburke" <ph**********@h otmail.com> wrote in message
news:YK%Me.2020 06$tt5.82500@ed tnps90...
Is there a way to make a page at the receiving end of a Server.Transfer
think that the request is a Postback? (When I say "think it is a
Postback," I mean I want the page to go through the ENTIRE event sequence
for a postback, including LoadViewState, ProcessPostData , etc.) Even when
Sever.Transfer transfers a page to itself (i.e., Page A.aspx contains
Server.Transfer ("A.apsx")) the request is seen as a first-time request,
not a Postback. Is there some way to fool/force the page into thinking the
request is a Postback and run through the entire event gambit, whether it
is from the same page or not?

To answer the inevitable question, "Why?" I have the following flow in my
application:

a.apsx -> b.aspx -> a.aspx

where b.aspx Server.Transfer s to a.aspx. Upon return to a.aspx, I want the
form to pick up where it left off, so that the little side trip to b.aspx
doesn't interrupt the user experience.

Thanks,
--kaburke

Nov 19 '05 #7
by stating "want the form to pick up where it left off" , i believe you are
looking for the data user entered in the first visit to a.aspx to be
displayed and any changes made to values of controls at server side to be
reflected.

Other than using b.aspx in a popup, do not know of any other default method
supported by asp.net/browser to handle this..

if content of a.aspx and b.aspx is simple, you may try using ASP:PANELs

One way to handle transfering data back and forth between multiple forms is
to use a transaction table in database.
"kaburke" wrote:
a.apsx -> b.aspx -> a.aspx

where b.aspx Server.Transfer s to a.aspx. Upon return to a.aspx, I want the
form to pick up where it left off, so that the little side trip to b.aspx
doesn't interrupt the user experience.

Nov 19 '05 #8

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

Similar topics

2
478
by: Cathy | last post by:
Has anyone ever made a webform button run an onClick event that is a Javascript in the HTML code and then after running the script make it go into the code-behind? An HTML button will run the onClick event but will not return to the code-behind. I need to get back to the code, which the webform button will do but I can't make it execute the script. Any help will be appreciated. Thanks.
0
1094
by: Amar | last post by:
After using Server.Transfer to transfer data from one page to another, I would like to know if there is a way to keep the receiving web page variables intact after a postback. Here is the code from the "sending" page: <code> Public ReadOnly Property SelectedDate() As Date Get Return Calendar1.SelectedDate End Get
4
4885
by: Bob H | last post by:
Hi, I'm aware of the different ways to pass variables between ASP.Net pages. For pages that need to pass a variable, we're using the server.transfer method. For others, we're using repsonse.redirect. My understanding was that the server.transfer method doesn't update the URL address bar. However, I've a situation that I'm a bit confused about and would appreciate any advice on why the following is occuring (i.e. why I'm obviously missing...
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
2
4349
by: RAJ | last post by:
In our multi-tier application, we have several ASP.NET user controls which will update the same data source provided by middle tier logic. In this particular scenario we have one user control displaying the contents of the data source, whilst another control updates the datasource via a command buttons implementation of 'Click', an event raised in the 'Handle Postback Events' stage of the control execution life cycle (via the...
11
6042
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...
3
1555
by: Ken Varn | last post by:
I have Page1 that does a transfer to page2. When the user is done with Page2, there is a button on Page2 that they can press to bring them back to Page1. I use Server.Transfer to navigate from one page to the next. The confusion that I am having is that when the user is done with Page2 and clicks on the button to bring them back to Page1, I want Page1 to basically come back with the exact same view that it had before the user navigated...
2
1863
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...
2
1529
by: senfo | last post by:
I'm just curious, what happens to the current Context if you're running your ASP.NET application in a web farm and transfer values from one page to the next with the Server.Transfer() method? It should be fine if the postback is to the same server, but what happens if you postback to another server in the farm? Is Server.Transfer() safe to use in a web farm? Thank you in advance,
0
8946
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
9447
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...
1
9235
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
9181
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
8186
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...
0
6031
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
4550
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
3261
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
2180
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.