Settng Focus on textbox using User Control

H

Huzaifa

hi

I have User control with some Text Boxes

i want to set the focus on the text box depending on the page where i am
using the User control

I tried couple of things in the ASPX Page and User Control but no luck


Thanks
Huzaifa

document.forms(0).txtABC.focus();



StringBuilder sb=new StringBuilder();

sb.Append("<script>");

sb.Append("document.forms(0).txtABC.focus();");

sb.Append("</script>");

ImageButton1.ImageUrl=sImageURL;

if (!(IsStartupScriptRegistered("HighTher")))

RegisterStartupScript("HighTher", sb.ToString()) ;
 

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,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top