首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

Request.Form有关问题

2012-01-19 
Request.Form问题我在aspx文件中通过js在一个div的innerHTML中添加了一个 inputtype text id txtNam

Request.Form问题
我在aspx文件中通过js在一个div的innerHTML中添加了一个 <input   type= "text "   id= "txtName "> ,在对应的cs文件中怎么访问txtName,通过Request.Form[ "txtName "]访问不到

[解决办法]
<input type= "text " id= "txtName " name= "txtName "> 要name
[解决办法]
Request.Form 取 name属性
[解决办法]
管它三七二十一,ID,NAME 一起多加上肯定没错,都用同一个名字
呵呵
[解决办法]
改成这样: <input runat= "server " type= "text " id= "txtName "> ,你就可以使用this.txtName.Text访问了。
[解决办法]
<input type= "text " id= "txtName " name= "txtName ">

热点排行