<%@ 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)
{
Style khakiStyle = new Style();
khakiStyle.BackColor = System.Drawing.Color.DarkKhaki;
khakiStyle.ForeColor = System.Drawing.Color.Snow;
khakiStyle.BorderColor = System.Drawing.Color.Khaki;
khakiStyle.Font.Italic = true;
khakiStyle.Font.Size = FontUnit.XLarge;
Calendar1.MergeStyle(khakiStyle);
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>How to use Calendar MergeStyle method in asp.net</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2 style="color:MidnightBlue; font-style:italic;">
How to use Calendar MergeStyle method in asp.net
</h2>
<hr width="550" align="left" color="SkyBlue"/>
<br />
<asp:Calendar
ID="Calendar1"
runat="server"
NextPrevFormat="ShortMonth"
SelectionMode="DayWeekMonth"
SelectMonthText="Month"
SelectWeekText="Week"
DayNameFormat="Full"
Font-Names="Book Antiqua"
ShowGridLines="true"
>
<DayHeaderStyle
BackColor="OliveDrab"
Font-Size="Medium"
BorderColor="Green"
Font-Italic="false"
/>
<TitleStyle
BackColor="MidnightBlue"
ForeColor="Snow"
Font-Size="X-Large"
BorderColor="Green"
Font-Italic="false"
/>
<NextPrevStyle Font-Size="Medium" />
<SelectorStyle
BackColor="OliveDrab"
Font-Size="Medium"
BorderColor="Green"
Font-Italic="false"
/>
<SelectedDayStyle BackColor="Crimson" />
</asp:Calendar>
<br />
<asp:Button
ID="Button1"
runat="server"
OnClick="Button1_Click"
Text="Calendar MergeStyle"
Height="45"
Font-Bold="true"
ForeColor="DarkBlue"
/>
</div>
</form>
</body>
</html>
<!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)
{
Style khakiStyle = new Style();
khakiStyle.BackColor = System.Drawing.Color.DarkKhaki;
khakiStyle.ForeColor = System.Drawing.Color.Snow;
khakiStyle.BorderColor = System.Drawing.Color.Khaki;
khakiStyle.Font.Italic = true;
khakiStyle.Font.Size = FontUnit.XLarge;
Calendar1.MergeStyle(khakiStyle);
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>How to use Calendar MergeStyle method in asp.net</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2 style="color:MidnightBlue; font-style:italic;">
How to use Calendar MergeStyle method in asp.net
</h2>
<hr width="550" align="left" color="SkyBlue"/>
<br />
<asp:Calendar
ID="Calendar1"
runat="server"
NextPrevFormat="ShortMonth"
SelectionMode="DayWeekMonth"
SelectMonthText="Month"
SelectWeekText="Week"
DayNameFormat="Full"
Font-Names="Book Antiqua"
ShowGridLines="true"
>
<DayHeaderStyle
BackColor="OliveDrab"
Font-Size="Medium"
BorderColor="Green"
Font-Italic="false"
/>
<TitleStyle
BackColor="MidnightBlue"
ForeColor="Snow"
Font-Size="X-Large"
BorderColor="Green"
Font-Italic="false"
/>
<NextPrevStyle Font-Size="Medium" />
<SelectorStyle
BackColor="OliveDrab"
Font-Size="Medium"
BorderColor="Green"
Font-Italic="false"
/>
<SelectedDayStyle BackColor="Crimson" />
</asp:Calendar>
<br />
<asp:Button
ID="Button1"
runat="server"
OnClick="Button1_Click"
Text="Calendar MergeStyle"
Height="45"
Font-Bold="true"
ForeColor="DarkBlue"
/>
</div>
</form>
</body>
</html>
No comments:
Post a Comment