Set focus to a label control

S

Sharon

Hi all,
How can i set focus to a label control.
lc.Focus() doesn't work.
Thanks,
Sharon.
 
G

Guest

You can't, setting focus to a label control doesn't make sense as it just
renders as text in the browser so there is no form field upon which to set
the focus.
 
N

Nenefta

hi Sharon,

maybe you need to create an anchor where you can link to on your
webpage?

Grtx,
Marcel
 
G

Guest

Exactly like Nenfta said
<a name="focusmylabel"><asp:label id="mylabel"></a>

in javascript function
window.location.href ="default.aspx#focusmylabel";

Hope this helps.
DWS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top