In this article I will explain a very common issue faced while using the ASP.Net AJAX Control Toolkit CalendarExtender control.
Whenever for the ASP.Net Textbox if the ReadOnly property of the Textbox is set to true, the selected data is not available in the Text property of the Textbox on PostBack as shown in the screenshot below.
Thus we need to do a small change in the way we are fetching the value server side.
protected void Submit(object sender, EventArgs e)
string date = Request.Form[txtDate.UniqueID];
Protected Sub Submit(ByVal sender As Object, ByVal e As System.EventArgs)
Dim strDate As String = Request.Form(txtDate.UniqueID)
As you can see above I am fetching the value of the Textbox from the Request.Form collection using the UniqueID property of the Textbox which is nothing but Client Side name of the ASP.Net TextBox control
The screenshot below describes that the selected date value is now available server side when fetched using the Request.Form collection
That’s it from me, hope you like this article.