Example: you only need to set the targetcontrolid of the calendarextender to the ID of the textbox whose date is to be displayed. The readonly attribute of the Textbox Control is set to false.
Main Code :
Copy code The Code is as follows: <asp: scriptmanager id = "scriptmanager1" runat = "server" enablescriptglobalization = "true" enablescriptlocalization = "true">
</ASP: scriptmanager>
<Ajaxtoolkit: calendarextender format = "yyyy-mm-dd" id = "calendarextender2"
Runat = "server" targetcontrolid = "textbox1">
</Ajaxtoolkit: calendarextender>
<Asp: textbox id = "textbox1" runat = "server"> </ASP: textbox>
The format attribute of calendarextender sets the display format of the time.
In addition, the popupbuttonid attribute sets the ID of a button control. Click this control to expand the calendarextender.
As follows:Copy codeThe Code is as follows: <asp: scriptmanager id = "scriptmanager1" runat = "server" enablescriptglobalization = "true" enablescriptlocalization = "true">
</ASP: scriptmanager>
<C0: calendarextender id = "calendarextender1" runat = "server" targetcontrolid = "textbox1" popupbuttonid = "imagebutton1">
</PC3: calendarextender>
<Asp: textbox id = "textbox1" runat = "server"> </ASP: textbox> <asp: imagebutton id = "imagebutton1"
Runat = "server"/>
When the enablescriptglobalization attribute and enablescriptlocalization attribute of scriptmanager are set to true, the control is in Chinese.
The attributes of the specific scriptmanager are still being learned.