Your technology certification is waiting. Enroll in Cloud Class ®
protected void OnClick_EventHandler(object sender, EventArgs e)
string ctrlName = page.Request.Params.Get("__LASTFOCUS");
Control ctl = Page.FindControl(ctrlName);
if(ctl.GetType() == typeof(TextBox))
// Here you could make sure the TextBox control
// is in fact one of the two you wanted, then
// set the other textbox's focus property
Open in new window
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Be seen. Boost your question’s priority for more expert views and faster solutions