我想在aspx的后台cs代码中获取页面中<input type="text" id="t1">这种html控件的值可以嘛??怎么取,最好给点代码参考!

解决方案 »

  1.   

    或者你可以将其设置为服务器端控件
    然后就可以取值
    其他时候 比如提交用request[控件id]
      

  2.   

    加上<input type="text" id="t1" runat="server">
    然后this.t1.text就可以取了
      

  3.   

    +++++++++++++++++++++++++++++++++++test.aspx
    <input type="text" id="t1" runat="server">
    ++++++++++++++++++++++++++++++++++++++++test.aspx.csResponse.Write(this.t1.text);