You are on page 1of 10

Rich Controls

• Rich controls are web controls which have complex user


interface elements.
• It renders itself with a complex sequence of HTML elements
and may even use client-side javascript.
• There are two Rich Controls:
• Calendar Control
• AdRotator Control
Rich Controls: Calendar Control
• The Calendar control is used to create a rich functionality
and good looking calendar that shows one month at a time.
• The user can move from month to month, select a date
and even select a range of days.
• Its ASP.Net tag is <asp:Calendar />.
Rich Controls: Calendar Control
Properties:
SelectedDates
DayHeaderStyle SelectionMode
DayNameFormat
SelectMonthText
DayStyle
SelectWeekText
FirstDayOfWeek
ShowDayHeader
NextMonthText
NextPrevFormat ShowGridLines
NextPrevStyle ShowNextPrevMonth
PrevMonthText ShowTitle
SelectedDate TodaysDate
Rich Controls: Calendar Control

Events:
SelectionChanged
Rich Controls: AdRotator Control
• The AdRotator control is used to randomly select the
banner from the list that is specified in the external XML
file.
• Before using AdRotator control, you need to create the
XML file.
• Its ASP.Net tag is <asp:AdRotator />.
Rich Controls: AdRotator Control

Properties: Events:
AdvertisementFile AdCreated
AlternateTextField
ImageUrlField
NavigateUrlField
KeyWordFilter
Rich Controls: AdRotator Control
Steps to create the XML file for the adRotator control.
• Right click on the Website in the Solution Explorer.
• Select Add New Item from the Popup menu.
• Select XML File Template from the wizard.
• Give appropriate name and click on Add button.
• Now, write down ad information that you want to provide to
the AdRotator control.
Rich Controls: AdRotator Control
Following are the elements of XML file used for storing
information of advertisements:
• ImageUrl: The absolute or relative path of the image.
• NavigateUrl: The URL of a page to link to if the user clicks the ad.
• AlternateText: The text displayed in place of the image when the
image specified by the ImageUrl property is not available.
• Keyword: A category for the advertisement, so you can filter.
• Impressions: A number that indicates the importance of the ad. The
larger the number, the more often the ad is displayed.
Rich Controls: AdRotator Control
Rich Controls: AdRotator Control

You might also like