Here I am giving you an example of the issue and the solution.
For date picker I used ASP.NET AJAX 's Calendar extender that can be attached to any ASP.NET TextBox control only. And in the textbox I don't want that user directly write any text.
For achieving this, if I make textbox read-only then at the server side textbox.text will come as blank(empty).
Solution
In code behind add an attribute.
txtDate.Attributes.Add("readonly", "readonly");
By doing this we can retrieve read-only textbox's value in the code behind.
No comments:
Post a Comment