467,926 Members | 2,026 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,926 developers. It's quick & easy.

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
  • viewed: 1819
Share:
1 Reply
read the following article

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

Post your reply

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

Similar topics

2 posts views Thread by SLE | last post: by
2 posts views Thread by Elsa Luiz | last post: by
3 posts views Thread by Dexter | last post: by
5 posts views Thread by Finn Stampe Mikkelsen | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.