I can use both in the code behind:
SetFocus() – “Sets the browser focus to the specified control.”
Focus() – “Sets input focus to a control.”
In practice, what’s the difference?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Page.SetFocuscan accept a control’s client ID as a string instead of a reference to the control itself, which may be useful if you can’t get a reference to the control to call its Focus method.control.Focus()is identical toPage.SetFocus(control). In fact, all is does is call SetFocus…