473,795 Members | 2,865 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Asp.Net AutoPostback and control focus

In Asp.Net v1.1 web form I have a number of controls which have the
autopostback enabled. Is it possible after the autopostback has run
that the control that caused the autopostback to get the focus?

Jun 21 '06 #1
1 1968
Hi, maybe you can use smartnavigation .
See http://geekswithblogs.net/ranganh/ar.../25/37616.aspx

Note that this solution only works on IE.
A cross-browser compatible solution is to use shomething like this:
Page.RegisterCl ientScriptBlock ("focus",
"document.< id-of-your-control>.focus( );")

--
Bent Kristiansen
bent.kristianse n(AT)bekk.no
"ro*******@hotm ail.com" wrote:
In Asp.Net v1.1 web form I have a number of controls which have the
autopostback enabled. Is it possible after the autopostback has run
that the control that caused the autopostback to get the focus?

Jun 21 '06 #2

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

Similar topics

1
1623
by: Matt | last post by:
When we set the AutoPostBack property=true in a web control, it means post the current form data to the IIS server, and open the current page (means refresh the page). Is that the correct logic? please advise. Thanks!!
6
327
by: Sunil | last post by:
Dear All I am a bit confused about AutoPost Back. My concept about AutoPostBack is that If AutoPostBack i "TRUE" for a Web Form the Web Form Goes back to the server and displays a fresh copy of th Web Form on the Browser. While If an AutoPostBack is False then the Web Form Stays on the browser and does not take a trip to the server Please let me know If I am saying correct Any help much appreciated
2
2343
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...
3
491
by: JJ | last post by:
Hi, If a control has autopostback set to true does that mean when the control losses focus then the page will postback again? A submit button will do the same thing as a control, lets say for interest sake a datalist control with autopostback set to true, both of these controls are causing a page postback correct? Thanks,
0
986
by: catweezle2010 | last post by:
Hello NG, I need autopostback to verify the user's input. They have to fill in the number of pices to order and I have to check each time if the allowed number is reached and something more. This function works fine. The Problem is, that the autopostback will take affect, when the user left the control for an other. Here he starts the new input. Meanwhile the postback takes effect and publish the new calculated site. The smartnavigation...
3
4041
by: Brad | last post by:
The first text on my form is a numeric field. I have a javascript that runs on this field for onkeyup (validate the key strokes and modifies fields on the screen) but when I do this and have the autopostback on, the autopostback does not trigger. The autopostback will trigger if I hit the enter key while in the textbox but not when I leave focus. Here is the code for the textbox. <asp:textbox class="required" AutoPostBack="True"...
1
2110
by: danyeungw | last post by:
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,...
4
5960
by: =?Utf-8?B?UmVuYXVkIExhbmdpcw==?= | last post by:
Hello, I have a strange yet very simple problem with the asp.net Textbox web control. On an empty asp.net page, add a single asp:TextBox control with Autopostback=false with nothing else on the page. according to the doc, hitting Enter while the TextBox has focus should do nothing since Autopostback=false. The problem i have is that it posts the form (that is, it ignores the Autopostback=false).
1
1478
by: Mufasa | last post by:
I have a couple of fields that are autopostback and I want to make tab work correctly between them. But whenever somebody changes the value and clicks somewhere else the page reloads as it should but there is no field with focus. So how can I tell what field the user clicked on before the page reloads, save that and set the focus to that field once they are done. TIA - J.
0
9672
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
9519
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,...
1
10163
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
9040
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...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6780
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();...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4113
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
3
2920
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.