473,395 Members | 1,675 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,395 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 2068
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: 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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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: 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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
0
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...
0
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...

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.