Click here to Skip to main content
15,890,123 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
JavaScript
$('#<%=txtPODate.ClientID%>').val(SupplierPOs[i].PODate);
                    $("#<%=txtPODate.ClientID%>").prop('disabled', true);<code></code>

here PODate textbox is not accessible in the code behind .
Posted
Updated 3-Jul-15 0:10am
v2

That is because disabled input elements in a form will not be submitted. http://www.w3schools.com/tags/att_input_disabled.asp[^]
 
Share this answer
 
Comments
Ni!E$H_WAGH 3-Jul-15 6:42am    
This is not a solution to my Question ...
Peter Leow 3-Jul-15 8:10am    
What you see as asp controls, e.g. textbox, will all be rendered as html elements like input type="text" on the client side. Yes, that is the answer to your question why that text box is not accessible on code behind. HTML elements that are declared as "disabled" are not submitted to the server on form submit.
you have to set your textbox value in hiddenfield from client side then only you can access that value server side.disable element cann't access from server side.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900