private void Page_Load(object sender, System.EventArgs e)
{
   //添加客户端文本框选择事件
   textbox1.Attributes["onFocus"] ="select(false);";
}在页面文件aspx中添加教本
<script language="javascript">
function select(bDisabled)
{
  document.forms[0].calendar.disabled=bDisabled;

}

解决方案 »

  1.   

    要看你是把calendar放到一个页面还是一个DIV中
      

  2.   

    服务器端的TextBox没有onfocus事件,不能通过服务器端脚本来实现,可以通过把calendar放置的一个DIV(层)中,在客户端设置DIV的可见否来实现
      

  3.   

    to 回复人: xueyhfeng(核桃(努力中…看书充电)) ( ) 信誉:100 
    你没有做过,请不要乱说上面的功能,我早就实现过
      

  4.   

    to 回复人: xueyhfeng(核桃(努力中…看书充电))
    对不起看错了,不过你那叫话"不能通过服务器端脚本"确实有毛病哈哈