Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have one contol ctlLoader which loads second control ucComment. The second control has one textbox txtNewComment. I'd like to set focus on my textbox. I've look at rendered code and find out that my controls id is

 

ctlLoader__ctl0_ucComment_txtNewComment

 

so I can set focus like this (client-side javascript):

 

document.frmDefault.ctlLoader__ctl0_ucComment_txtNewComment.focus();

 

But how can I get this id programatically?

A man and a dog have an average of three legs.

Beaware of Statistics.

Posted

*scratches head*

 

If all you want to do is set the focus to a control then why would you need the ID? Can't you just do a simple txtNewComment.Focus() ?

Gamer extraordinaire. Programmer wannabe.
Posted
The focus was only example. I'd like to do a little bit more on a client :)

A man and a dog have an average of three legs.

Beaware of Statistics.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...