472,984 Members | 2,075 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,984 software developers and data experts.

Controls Lose Focus When You Enable SmartNavigation and AutoPostBack

I get the following from the link http://support.microsoft.com/kb/314206. I need to have both work - the page stays where it is and set focus to next control. Does anyone have solution? I have been working on this for days. I am using ASP.NET 2003. Thanks.

DanYeung

PRB: Controls Lose Focus When You Enable SmartNavigation and AutoPostBack
View products that this article applies to.
Article ID : 314206
Last Review : February 23, 2007
Revision : 4.1
This article was previously published under Q314206
On This Page

SYMPTOMS

CAUSE

STATUS

MORE INFORMATION

Steps to Reproduce the Behavior

REFERENCES
SYMPTOMS
When you use the TAB key to move through Web Form controls, when you enable both SmartNavigation and AutoPostBack, the control that receives focus loses focus after the control posts back.
Back to the top

CAUSE
This problem occurs because of how SmartNavigation is implemented to track the current state and active element between round trips to the server.
Back to the top

STATUS
This behavior is by design.
Back to the top

MORE INFORMATION
Steps to Reproduce the Behavior
1. Create a new ASP.NET page with the following code:<%@ Page SmartNavigation="true" language="c#" AutoEventWireup="false" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name=vs_defaultClientScript content="JavaScript (ECMAScript)">
<meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<asp:TextBox AutoPostBack=True id=TextBox1 runat="server" />
<asp:TextBox AutoPostBack=True id=TextBox2 runat="server" />
</form>
</body>
</HTML>


2. Run the page.
3. Type some text in TextBox1, and then press the TAB key to move to the next control. Notice that the focus is temporarily set on TextBox2, but then the focus is lost and set back to the initial control (TextBox1).
Mar 12 '07 #1
1 2045
read the following article

http://www.dotnetspider.com/kb/Article3343.aspx
http://www.dotnetspider.com/members/rameshgoudd.aspx
Sep 1 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: DBQueen | last post by:
I have a form with lines of controls. On some of the lines there are 3 controls (call them A,B,C); other lines have only control A. The controls have been numbered sequentially (Q20, Q21....Q76)...
8
by: Matthew Louden | last post by:
why need to set autopostback property to be true?? I know autopostback event means to send the form to the server automatically. I tried checkbox, checkbox list, radio button, and radio button...
2
by: SLE | last post by:
A web user control exposes a RadioButtonList (with AutoPostBack = true) called "Question". This control also has an embedded RequiredFieldValidator control. 1. Main ASPX page is populated with...
2
by: Elsa Luiz | last post by:
Hi everyone, I have this problem hope you could help me... I have an A.aspx page with a button, when I click the button I would like to open another window with containing B.aspx. The problem is...
2
by: Mad Scientist Jr | last post by:
I have autopostback turned on for Textbox1. When the user tabs out of it, the codebehind recalculates some other fields based on its value, and the user should be able to start typing a value in...
3
by: Dexter | last post by:
Hello All, I have a web control that when receive the focus, a postback is called, using getPostBackEventReference. But, when the PostBack is called, i want that the focus goes to the web control....
3
by: LU | last post by:
I query database, QuestionID | QuestionName | QuestionType 1 | FirstName | TextBox 2 | LastName | TextBox Loop Create TextBox Create...
1
by: teddysnips | last post by:
Visual Studio 2005 I have a moderately complicated form. It has four User Controls, which are (somewhat simplified): 1. A tree control showing an employee hierarchy Below a tab strip with...
5
by: Finn Stampe Mikkelsen | last post by:
Hi How can i set a focus to a textbox in my codebehind page?? I have this WebForm, that takes information from a user and 2 buttons on the form. One that takes action on the entered...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.