1
我想在我的一个查询中使用输入为html
的textbox
的值。所以我试图像下面没有得到代码中的输入文本值
string strInwardNO = Request.Form["TxtIwNo"];
和HTML是
<input id="TxtIwNo" type="text" runat="server" disabled="disabled" />
,但我没有得到的值。什么是错在这里
当我检查调试时,我总是能得到它为NULL
'Disabled'不会将控件的值发送到服务器端。请检查:http://stackoverflow.com/questions/23308124/asp-net-text-doesnt-sends-value-when-disabled – MusicLovingIndianGirl
@ MusicLovingIndianGirl:我猜测它,但'只读'会改变文本框的了望 – BNN
如果您的输入被禁用,那么它如何保存任何用户值?如果它没有任何用户值,然后在您的后端设置默认值.. – Bharat