I’ve set a textbox to read-only. When the user clicks on it, a calendar is displayed and the user selects the date which inputs into the read-only textbox.
But when I try to enter the data into the database, it shows null value. What is wrong?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is a little bit of strangeness when it comes to the ASP.NET
Readonlyproperty and thereadonlyattribute of an HTML input element. Rather than setting theReadonlyproperty of the web control try simply adding the HTML attribute to the control like this:This will make the control read-only in the client’s browser yet still allow you to retrieve the value of the input when it posts back to the server.