Work With Web Controls

You can set a number of properties for the Calendar control to customize the control. The following code can customize the control in a number of ways, such as enabling the user to select a week or a month at a time as opposed to just a single date.

Example:

<ASP:CALENDAR ID="calendarGoal" RUNAT="Server" onSelectionChanged="Date_Selected" DAYNAMEFORMAT="FirstLetter" SELECTIONMODE="DayWeekMonth" FONT-NAME="Verdana" FONT-SIZE=M12px" HEIGHT=n180px" WIDTH="230px" TODAYDAYSTYLE-FONT-BOLD="True" DAYHEADERSTYLE-FONT-BOLD="True" OTHERMONTHDAYSTYLE-FORECOLOR="Gray" TITLESTYLE-BACKCOLOR="Navy" TITLESTYLE-FORECOLOR="White" TITLESTYLE-FONT-BOLD="True" SELECTEDDAYSTYLE-BACKCOLOR="LightBlue" SELECTEDDAYSTYLE-FONT-BOLD="True"

—Q Create the Date Selected function.

° Set the label according to the input received from the user.

Save the file and request it from the Web server.

■ A calendar appears. -E Click to select a date. I The date echoes back.

—Q Create the Date Selected function.

° Set the label according to the input received from the user.

Save the file and request it from the Web server.

Note: See pages 20 to 25 for instructions on saving a file to the Web server and then requesting the file using the IIS Admin.

■ A calendar appears. -E Click to select a date. I The date echoes back.

Was this article helpful?

0 0

Post a comment