473,785 Members | 2,325 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Server Transfer doesn't Set Focus to Page

This has been driving me crazy. server.transfer doesn't set the focus
to the page I transfer to so when the user does a refresh, the results
aren't what's expected.

I have a datagrid on one page that lists the student's guests. At the
bottom of the datagrid is an 'add a new guest' button. Users click on
this button an it takes them to a new page where they can add a new
guest. So they type in the guest information and click on the 'save'
button. server.transfer takes them back to the datagrid page where
their guest is listed.

Simple enough, right? The problem is, after you save a guest and return
to the datagrid page, when the user refreshes, it adds the same guest to
the datagrid, creating a duplicate guest entry. It took me a long time
to figure out what is happening. The focus is still on the 'add a
guest' page so when you refresh, it's just like clicking on the 'save'
button.

How do I set the focus to the datagrid page after I save a guest? I
need to use server transfer.

Nov 18 '05 #1
1 1613
It is setting focus, but a refresh forces the same action when you have the
form linked via Server.Transfer (). I would consider going to
Response.Redire ct instead as a refresh will only refresh the page rather than
rerun the form submit.

The action you are speaking of is normal, as the browser is asking for a
refresh on the entire process, as it does not realize it has been transfered
on the server side.

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************** ************
Think Outside the Box!
*************** ************

"Jim Bayers" wrote:
This has been driving me crazy. server.transfer doesn't set the focus
to the page I transfer to so when the user does a refresh, the results
aren't what's expected.

I have a datagrid on one page that lists the student's guests. At the
bottom of the datagrid is an 'add a new guest' button. Users click on
this button an it takes them to a new page where they can add a new
guest. So they type in the guest information and click on the 'save'
button. server.transfer takes them back to the datagrid page where
their guest is listed.

Simple enough, right? The problem is, after you save a guest and return
to the datagrid page, when the user refreshes, it adds the same guest to
the datagrid, creating a duplicate guest entry. It took me a long time
to figure out what is happening. The focus is still on the 'add a
guest' page so when you refresh, it's just like clicking on the 'save'
button.

How do I set the focus to the datagrid page after I save a guest? I
need to use server transfer.

Nov 18 '05 #2

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

Similar topics

4
2117
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
3
2145
by: Manuel Lopez | last post by:
Hello, We have two applications that will reside on the same webserver. We want to be able to post from pages in App1 to to pages in App2. We need to pass sensible data, so we cannot use querystring. We are using server.transfer (needing to reference App2 in App1).
5
3758
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)
4
4887
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...
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...
3
1557
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...
3
5507
by: Alan Silver | last post by:
Hello, Sorry if this is a stupid question, but I can't really see much difference between these tow methods according to the scant info in the SDK. Could anyone enlighten me? TIA -- Alan Silver
5
2185
by: Richard | last post by:
I've developed a small ASPX template framework (based on Chun Li's article on CodeProject: http://www.codeproject.com/aspnet/headerfooter.asp#xx849313xx) which uses a IHttpModule to apply usercontrols (e.g. header and footer) on pages. The module determines if templates should be added to the page using Page.Request.Path. It matches the current adress to settings found in a configuration-file... It works like a charm except for one...
3
3601
by: graphicssl | last post by:
Okay, so first of all, I'm a designer first and a light coder second (I'm only really trained with HTML and CSS). So I apologize for having to post about something that's probably super-trivial! I'm working on setting up a shopping cart for a one-product web site, and I'm using HTML and CSS, with ASP for the shopping cart. The ASP takes the information from the form on the shopping cart, and formats it in to two e-mails: one for the company...
0
9645
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
9481
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
10155
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10095
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
8979
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
6741
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();...
1
4054
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
3656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2881
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.