N K N K - 4 months ago 6x
HTML Question

Not getting Input text value in code behind

I want to use the value of the

which is input
in one of my query. SO I tried like below

string strInwardNO = Request.Form["TxtIwNo"];

and HTML is

<input id="TxtIwNo" type="text" runat="server" disabled="disabled" />

but I am not getting value. What is wrong here

When I check while debugging, I always get it as NULL


In order to input field value was posted to your backend it cannot be disabled. Change it to readonly and style it to look like disabled:

input[readonly] { 
    background: #CCC; 
    color: #333; 
    border: 1px solid #666