473,396 Members | 1,775 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,396 software developers and data experts.

Is there any way to determine which control has the focus in the codebehind?

Hello,

I need to determine which control has the focus in my page_load. Is there a
way to do so.
I have found lots of sample explaining how to set the focus (using
javascript). but no info explaining how to determine how to determine who
has the focus (or a .HasFocus() method).

Thanks,
José
Jun 24 '06 #1
2 1695
Are you using asp.net version 1.1 or 2.0?

"José Joye" <me@me.com> wrote in message news:44********@news.post.ch...
Hello,

I need to determine which control has the focus in my page_load. Is there
a
way to do so.
I have found lots of sample explaining how to set the focus (using
javascript). but no info explaining how to determine how to determine who
has the focus (or a .HasFocus() method).

Thanks,
José

Jun 24 '06 #2
I'm usign .net 1.1

- José
"Patrick.O.Ige" <na********@hotmail.com> wrote in message
news:ej**************@TK2MSFTNGP04.phx.gbl...
Are you using asp.net version 1.1 or 2.0?

"José Joye" <me@me.com> wrote in message news:44********@news.post.ch...
Hello,

I need to determine which control has the focus in my page_load. Is there a
way to do so.
I have found lots of sample explaining how to set the focus (using
javascript). but no info explaining how to determine how to determine who has the focus (or a .HasFocus() method).

Thanks,
José


Jun 24 '06 #3

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

Similar topics

2
by: Liam McNamara | last post by:
I am having the same problem as the one I found in google below: ...
6
by: Alex Bink | last post by:
Hi, I have a validating event on a textbox in which I want to prevent the user to leave the textbox without entering the right data. Only if he clicks on another specific control he is allowed...
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...
12
by: CLEAR-RCIC | last post by:
Hi, I'm having problems setting focus to a textbox on a web user contol on an asp.net web page. The following script works on normal asp.net pages: <script language="javascript"> function...
1
by: ravi | last post by:
Hi all, In my asp.net web form i am using regular expressions for the controls. When the mis match occurs it should give a error message and should set the focus to the particular controls. ...
2
by: john | last post by:
Maybe I haven't had that "a-ha" moment yet, but I think the new approach to web projects is a step in the wrong direction. My main beef is that control over the assembly generation process has...
1
by: amjad | last post by:
Hi i need to write javascript to shift control focus ..... like if i enter in textbox 1 then it set focus to textbox2 or 3 any thing ... the other thing is how i know i can do like...
1
by: Ryan | last post by:
Hello, I am starting the use the new ajax.net and I am seeing a bizarre behavior when controlling focus from the codebehind. I have tried: <control>.focus page.setfocus(<control>)...
10
by: John Brown | last post by:
Hi there, Does anyone know how to (generically) determine the currently active form for an application using a "static" function (so I can call it from anywhere). There is no offiical way I've...
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:
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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,...
0
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...
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
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...

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.