<%@ Page Language="C#" AutoEventWireup="true" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> protected void Button1_Click(object sender, System.EventArgs e) { Calendar1.SelectWeekText = "Week"; } </script> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title>How to use Calendar SelectWeekText in asp.net</title> </head> <body> <form id="form1" runat="server"> <div> <h2 style="color:DodgerBlue; font-style:italic;"> How to use Calendar SelectWeekText in asp.net </h2> <hr width="500" align="left" color="MediumSlateBlue" /> <asp:Calendar ID="Calendar1" runat="server" NextPrevFormat="ShortMonth" SelectionMode="DayWeekMonth" ForeColor="WhiteSmoke" DayNameFormat="Full" BorderStyle="None" Font-Names="Book Antiqua" Font-Size="Medium" SelectedDayStyle-BackColor="DarkKhaki" SelectedDayStyle-Font-Italic="true" SelectedDayStyle-ForeColor="Snow" SelectedDayStyle-BorderColor="Snow" SelectedDayStyle-BorderWidth="1" TodayDayStyle-BackColor="DarkSalmon" TitleStyle-BackColor="BurlyWood" TitleStyle-Height="25" WeekendDayStyle-BackColor="DarkOrange" WeekendDayStyle-Font-Names="Courier New" WeekendDayStyle-BorderColor="Orange" WeekendDayStyle-BorderWidth="1" > <DayHeaderStyle BackColor="DarkGreen" ForeColor="White" Font-Bold="false" Font-Names="Courier New" /> <OtherMonthDayStyle BackColor="DarkOliveGreen" ForeColor="Snow" Font-Size="Small" BorderColor="OliveDrab" BorderWidth="1" /> <DayStyle BackColor="Tomato" ForeColor="Snow" Font-Italic="false" Font-Names="Arial CE" BorderColor="DarkOrange" BorderWidth="1" /> <SelectorStyle BackColor="Crimson" BorderColor="IndianRed" BorderStyle="Inset" BorderWidth="1" ForeColor="Pink" Font-Names="Courier New" Font-Size="Small" Font-Italic="true" /> <NextPrevStyle ForeColor="Snow" Font-Underline="false" Wrap="false" /> </asp:Calendar> <br /> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Set Calendar SelectWeekText 'week'" Height="45" Font-Bold="true" ForeColor="SlateBlue" /> </div> </form> </body> </html>
OUTPUT



No comments:
Post a Comment