Calendar Control
The calendar control is used to display an optional date in the calendar in a Web page and to display the data associated with a specific date.
The control declaration code is as follows:
<asp:calendar id= "Calendar1" runat= "Server"/>
How to set the appearance of the Calendar control :
1. Use the AutoFormat dialog box to select the appearance format.
2. set the properties.
3. set extended style properties.
4. customize the rendering of individual dates.
Common Properties for the Calendar control:
1.GetDayOfMonth: Returns the day of the month in the specified datetime .
2.GetDayOfWeek: Returns the Day of the week in the specified DateTime.
3.GetDayOfYear: Returns the date in the specified DateTime as the day ordinal of the year.
4.GetDaysInMonth: Returns the number of days in the specified month.
5.GetDaysInYear: Returns the number of days in the specified year.
6.GetLeapMonth: Calculates the leap month for a specified year or a specified era year.
7.GetMonth: Returns the month in the specified DateTime.
8.GetMonthsInYear: Returns the number of months in the specified year.
9.GetWeekOfYear: Returns the week of the year that includes the date in the specified DateTime.
10.GetYear: Returns the year in the specified DateTime.
11.SelectionChanged Event: When the user picks a date, the event specified by SelectionChanged is driven.
Calendar control programming. The Calendar control programming is primarily done in the three events it provides, and The events provided by the Calendar control are as follows:
1. DayRender event.
2. SelectionChanged event.
3. VisibleMonthChanged event.
AdRotator Controls
The AdRotator control provides an easy way to display ads on a page that can display a graphical image that, when clicked, directs the user to the specified URL, and the control can automatically read the advertisement information from the data source.
The AdRotator control displays ads in the following three ways:
1. display ads randomly.
2. prioritize your ads to make certain ads appear more often.
3. Write loop logic to display ads.
the AdRotator control can read data from a data source in the following form:
1. XML file.
2. database.
3. custom logic. Create a handler for the AdCreated event and select an ad in the event.
Read ad information from the data source. AdRotator The control uses its own properties to define the information required by an ad body, which is optional, and can be used as the information for the ad body using the following attributes:
1. ImageUrl: The URL of the image to display .
2. NAVIGATEURL : Click The URL of the AdRotator control to go to the page .
3. AlternateText : Text displayed when the image is not available.
4. Keyword : An ad category that you can use to filter specific ads.
5. Impressions : A numeric value that indicates how often the ad may appear.
6. Height: The altitude of the advertisement.
7. width: The breadth of the advertisement.
multiview and view control
The MultiView control is used to define a view control group, which you can use to define a set of view controls. View controls can only be used if they are added to a MultiView control, where each view control contains other controls. The control can display a view control at a time and expose the markup and controls within the view control, enabling the Multi-view window to be implemented.
The control declaration code is as follows:
<asp:multiview id= "MultiView1" activeviewindex= "0" runat= "Server"/>
MultiView Control-important properties and methods:
1. ActiveViewIndex: Gets or sets the activityViewthe index of the control. MultiViewControl byViewthe order in which the controls appear on the page1to then-1the number,NTable CurrentMultiViewcontrol in theViewThe number of controls. If the display is added to theMultiViewcontrol in the1aViewcontrol with the property set to the0".
2. Views: Gets the View control collection for the MultiView control .
3. Visble: Used to set Whether the MultiView control is visible by default.
4. Createdcontrolcollection: Create controlcollection to save the MultiView control's child controls.
5. GetActiveView: Returns the currently active View Control for the MultiView control .
6. SetActiveView: Sets the specified view control to the active view of the MultiView control.
7. Removedcontrol: controls from the MultiView control in the View control Called after it has been removed from the collection.
8. Onactiveviewchanged Event: Raises the activeviewchanged Event of the MultiView control .
The Wizard control
the Wizard control can create multiple views of a form, displaying only one form at a time. the Wizard Control simplifies many tasks related to building multiple forms and collecting user input actions. the Wizard Control provides a simple mechanism that allows you to easily build steps, add new steps, or rearrange steps, programmers can implement linear or non-linear navigation without having to write any code, and customize the user navigation of the control.
The control declaration code is as follows:
<asp:wizard id= "Wizard1" runat= "Server" >
<WizardSteps>
<asp:wizardstep runat= "Server" title= "Step 1" > </asp:WizardStep>
<asp:wizardstep runat= "Server" title= "Step 2" > </asp:WizardStep>
</WizardSteps>
</asp:Wizard>
Rich Control One