<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
TagPrefix="cc2" %>
<asp:TextBox ID="txtngaydat" runat="server"></asp:TextBox>
<cc2:CalendarExtender ID="CalNgayDat" TargetControlID="txtngaydat"
PopupButtonID="ibtCal" runat="server"></cc2:CalendarExtender>
Asked
Active
Viewed 1,791 times
1

hello_there_andy
- 2,039
- 2
- 21
- 51

NvD
- 13
- 6
-
possible duplicate of [How can I make CalendarExtender StartDate attribute take the current date?](http://stackoverflow.com/questions/8863914/how-can-i-make-calendarextender-startdate-attribute-take-the-current-date) – Krishnraj Rana May 07 '15 at 15:36
-
I do not understand your idea :o ??? – NvD May 08 '15 at 15:41
1 Answers
0
I think you need to set StartDate on Page_Load event.
protected void Page_Load(object sender, EventArgs e)
{
CalNgayDat.StartDate = DateTime.Now;
}

Keval Gangani
- 1,326
- 2
- 14
- 28
-
I make but error: Error 14 'AjaxControlToolkit.CalendarExtender' does not contain a definition for 'StartDate' and no extension method 'StartDate' accepting a first argument of type 'AjaxControlToolkit.CalendarExtender' could be found (are you missing a using directive or an assembly reference?) D:\Study\DoAnIT\BusOnlineTicketsWeb\Default.aspx.cs 22 24 BusOnlineTicketsWeb – NvD May 08 '15 at 15:36
-
Do you have AjaxControlToolkit in BIN folder or give reference in your project? – Keval Gangani May 08 '15 at 15:39
-