how to make asp.net textbox readonly when using jquery calendar
When using jquery calendar with asp.net text box and you also do not want user input just want a read only textbox you can set text box attribute to readonly=”true” but that will not make the textbox value accessible in code behind of your page a solution is to add
Put onKeyPress = “javascript: return false;” onPaste = “javascript: return false;” in your textbox. That way, even the textbox is enabled, the user will not be able to modify the data.
in your codebehind add
TEXTBOX.Attributes.Add(“onKeyPress”, “javascript: return false;”)
TEXTBOX.Attributes.Add(“onPaste”, “javascript: return false;”)
and this stop user modify the textbox value and also you can access the value of text box in your codebehind
Recent Comments