/**//// <summary> /// 服务器端弹出alert对话框,并使控件获得焦点 /// </summary> /// <param name="str_Ctl_Name">获得焦点控件Id值,比如:txt_Name</param> /// <param name="str_Message">提示信息,例子:"请输入您姓名!"</param> /// <param name="page">Page类</param> public void Alert ( string str_Ctl_Name,string str_Message,Page page ) { page.RegisterStartupScript ( "","<script>alert('"+str_Message+"');document.forms(0)."+str_Ctl_Name+".focus(); document.forms(0)."+str_Ctl_Name +".select();</script>" ); }