The date Selection control is useful in many places, and there are many implementation methods. I once wrote a lame JS date control, so I pasted the code because it was too bad. Today we will introduce the Ajax calendar control provided by Microsoft. This control uses Ajax effects and sets events and effects through front-end JS and style. Rich functions and styles are essential for website design and MIS development.
By convention, it is now time to paste the Code:
<Asp: textbox runat = "server" id = "txtcalendar" width = "150"/>
<Ajaxtoolkit: calendarextender runat = "server" targetcontrolid = "txtcalendar" cssclass = "mycalendar"
Format = "yyyy-mm-dd"/>
Because the style is set, we can paste the code here, just write a simple style:
. Mycalendar. Ajax _ calendar_container
{
Border: 1px solid #646464;
Background-color: maroon;
Color: red;
}
When we run this way, you will find that the English language is poor, and we do not have any Chinese. What makes us feel so embarrassed! What should we do? Of course, there are solutions that can be easily implemented. If you do not want to sell off the customs, you only need to set enablescriptglobalization and enablescriptlocalization to true.
Let's talk about the attributes. targetcontrolid is not mentioned. format is the display style, which is the same as the date format in C. Popupbuttonid is the ID of the pop-up button control.
There are many styles:
. Ajax _ calendar_container
. Ajax _ calendar_header
. Ajax _ calendar_prev
. Ajax _ calendar_title
............ A lot of, you can see this URL: http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/Calendar/Calendar.aspx
The usage has been introduced. Continue to study!
The date Selection control is useful in many places, and there are many implementation methods. I once wrote a lame JS date control, so I pasted the code because it was too bad. Today we will introduce the Ajax calendar control provided by Microsoft. This control uses Ajax effects and sets events and effects through front-end JS and style. Rich functions and styles are essential for website design and MIS development.
By convention, it is now time to paste the Code:
<Asp: textbox runat = "server" id = "txtcalendar" width = "150"/>
<Ajaxtoolkit: calendarextender runat = "server" targetcontrolid = "txtcalendar" cssclass = "mycalendar"
Format = "yyyy-mm-dd"/>
Because the style is set, we can paste the code here, just write a simple style:
. Mycalendar. Ajax _ calendar_container
{
Border: 1px solid #646464;
Background-color: maroon;
Color: red;
}
When we run this way, you will find that the English language is poor, and we do not have any Chinese. What makes us feel so embarrassed! What should we do? Of course, there are solutions that can be easily implemented. If you do not want to sell off the customs, you only need to set enablescriptglobalization and enablescriptlocalization to true.
Let's talk about the attributes. targetcontrolid is not mentioned. format is the display style, which is the same as the date format in C. Popupbuttonid is the ID of the pop-up button control.
There are many styles:
. Ajax _ calendar_container
. Ajax _ calendar_header
. Ajax _ calendar_prev
. Ajax _ calendar_title
............ A lot of, you can see this URL: http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/Calendar/Calendar.aspx
The usage has been introduced. Continue to study!