I get the following from the link http://support.microso ft.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="Micros oft Visual Studio 7.0">
<meta name="CODE_LANG UAGE" Content="C#">
<meta name=vs_default ClientScript content="JavaSc ript (ECMAScript)">
<meta name=vs_targetS chema content="http://schemas.microso ft.com/intellisense/ie5">
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<asp:TextBox AutoPostBack=Tr ue id=TextBox1 runat="server" />
<asp:TextBox AutoPostBack=Tr ue 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).
1 2108
read the following article
http://www.dotnetspide r.com/kb/Article3343.asp x
http://www.dotnetspide r.com/members/rameshgoudd.asp x
Sign in to post your reply or Sign up for a free account.
Similar topics |
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) and they were put onto the
form in the numerical sequence. I have given the A's with B & C's on the
same line a tag=1; B.tag=2, C,tag=2)
I am trying to write 2 modules so that the following occurs (on Form_Current
and 'A' Control_Before or...
|
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 list, and
they all need to set autopostback property to be true, in order to make the
event of the control fires.
I know this is the must, but I dont know why. Please advise!
Thanks!
|
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 several "Questions".
2. Within the code of the main page, there is a SelectedIndexChanged handler
for the RadioButtonList exposed by Question. The function loops through a
number of questions on the pages and hides/shows questions (control.visible...
|
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
that the window B.aspx appears fine but the focus returns to the
parent (A.aspx), I would like the focus in B.aspx window.
When I click the button on A.aspx I execute the following code:
private void btMyButton_Click(object sender,...
|
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 the next
control Textbox2. However, when the page is rendered, the focus goes
back to Textbox1. In order to go to the next control the user has to
hit tab twice - once to recalculate, and once to tab out of the
control. Is there some way to make it...
| |
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.
Somebody know how to make this?
Dexter
|
by: LU |
last post by:
I query database,
QuestionID | QuestionName | QuestionType
1 | FirstName | TextBox
2 | LastName | TextBox
Loop
Create TextBox
Create RequiredFieldValidator
Here is my problem.
|
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 three tabs:
1. A User Control containing a check box (AutoPostback = True), a
|
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 information and one that resets
the form...
The second on, the reset button, i would like to set focus back to the first
textbox on the form. I already have an onload in my body, which sets the
|
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...
|
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,...
| |
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...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |