<input id="txtSearch" type="text" size="14" runat="server"/
                                                                                                      <asp:ImageButton ID="ImageButton1" ImageUrl="images/search.jpg" width="53" height="19" runat="server" OnClick="ImageButton1_Click" />怎么样才能让txtSearch回车转页??

解决方案 »

  1.   

    在后台cs文件page_load事件里写this.txtSearch.Attributes.Add("onkeydown", "javascript:if(event.keyCode==13){document.all.ImageButton1.focus();}");
      

  2.   

    页面后缀是xxxx.master的页~~有没有代码???
      

  3.   

    当光标在txtSearch里是你按回车,会触发ImageButton1提交事件
      

  4.   

    <input   id= "txtSearch "   type= "text "   size= "14 "   runat= "server " 
    onkeydown="javascript:if(event.keyCode==13){document.all.ImageButton1.focus();}"/>
    你试一下这样行不..
      

  5.   

    我是这样写的
    this.txtSearch.Attributes.Add( "onkeydown ",   "if(event.keyCode==13){document.all['ImageButton1'].focus();} ");没用。回车后就在本页面刷新了?~点就可以过去。郁闷~
      

  6.   

    那你在到百度或者goole搜搜别的资料在看看 ..