ASP.NET Calendar - Knowledge Base

« Back to Knowledge Base list

Use readonly textbox with date picker

Q:

How can I use readonly textbox with date picker?

A:

aspx

<asp:TextBox Readonly="true" runat="server" id="txtDate" />
<obout:Calendar runat="server" DatePickerMode = "true" TextBoxId = "txtDate" />



code behind - get the date after postback

string date = Request[txtDate.UniqueID];