I know little about ASP. NET. I used web matrix as a date Selection control to make everyone laugh.
The control code is as follows:
<%... @ Control classname = "customcalender" autoeventwireup = "false" Language = "C #" targetschema = "http://schemas.microsoft.com/intellisense/ie5" %>
<SCRIPT runat = "server">...
Private void calendar1_selectionchanged (system. Object sender, system. eventargs E)
...{
Textbox1.text = calendar2.selecteddate. tow.datestring ();
Panel1.visible = false;
}
Private void onclick (system. Object sender, system. eventargs E)
...{
If (panel1.visible)
...{
Panel1.visible = false;
}
Else
...{
Panel1.visible = true;
}
}
</SCRIPT>
<! -- Insert content here -->
<Asp: textbox id = "textbox1" runat = "server"> </ASP: textbox>
<Asp: button id = "button1" onclick = "onclick" runat = "server" size = "43" text = "... "Height =" 22 "width =" 35 "type =" button "> </ASP: button>
<Div id = "divcalendar">
<Asp: Panel id = "Panel1" runat = "server" width = "172px" Height = "182px" visible = "false">
<Asp: calendar id = "calendar2" runat = "server" width = "200px" Height = "180px" onselectionchanged = "calendar#selectionchanged" borderwidth = "2px" backcolor = "white" forecolor = "Black "font-size =" 8pt "font-names =" verdana "bordercolor =" #999999 "borderstyle =" outset "daynameformat =" firstletter "cellpadding =" 4 ">
<Todaydaystyle forecolor = "black" backcolor = "# cccccc"> </todaydaystyle>
<Selectorstyle backcolor = "# cccccc"> </selectorstyle>
<Nextprevstyle verticalalign = "bottom"> </nextprevstyle>
<Dayheaderstyle font-size = "7pt" font-bold = "true" backcolor = "# cccccc"> </dayheaderstyle>
<Selecteddaystyle font-bold = "true" forecolor = "white" backcolor = "#666666"> </selecteddaystyle>
<Titlestyle font-bold = "true" bordercolor = "black" backcolor = "#999999"> </titlestyle>
<Weekenddaystyle backcolor = "# ffffcc"> </weekenddaystyle>
<Othermonthdaystyle forecolor = "#808080"> </othermonthdaystyle>
</ASP: Calendar>
</ASP: Panel>
</Div>
Call Page code: