469,268 Members | 1,015 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,268 developers. It's quick & easy.

Set focus to a label control

Hi all,
How can i set focus to a label control.
lc.Focus() doesn't work.
Thanks,
Sharon.
Mar 29 '06 #1
5 6078
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.

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

Mar 29 '06 #2
How can i scroll the page to the label control,
so it is visible?

"clickon" <cl*****@discussions.microsoft.com> wrote in message
news:90**********************************@microsof t.com...
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.

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

Mar 29 '06 #3
What do you mean by scroll to labe control??
Patrick

"Sharon" <nu**@void.nothing> wrote in message
news:e3**************@TK2MSFTNGP12.phx.gbl...
How can i scroll the page to the label control,
so it is visible?

"clickon" <cl*****@discussions.microsoft.com> wrote in message
news:90**********************************@microsof t.com...
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.

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


Mar 29 '06 #4
hi Sharon,

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

Grtx,
Marcel

Mar 29 '06 #5
DWS
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
"Nenefta" wrote:
hi Sharon,

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

Grtx,
Marcel

Mar 29 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Albinas | last post: by
reply views Thread by Steve Bezner | last post: by
2 posts views Thread by =?Utf-8?B?U2hhcm9u?= | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.