/**//// <summary> /// 使控件获得焦点 /// </summary> /// <param name="str_Ctl_Name">获得焦点控件Id值,比如:txt_Name</param> /// <param name="page">Page类</param> public void GetFocus ( string str_Ctl_Name,Page page ) { page.RegisterStartupScript ( "","<script>document.forms(0)."+str_Ctl_Name+".focus(); document.forms(0)."+str_Ctl_Name+".select();</script>" ); }