However if you want to change the header/background color of an ASP.NET AJAX CalendarExtender, then here's how to do it using CSS.
<head runat="server">
<title></title>
<style type="text/css">
.cal .ajax__calendar_header
{
background-color: Silver;
}
.cal .ajax__calendar_container
{
background-color: Gray;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<cc1:CalendarExtender ID="CalendarExtender1" runat="server" CssClass="cal"
TargetControlID="TextBox1" >
</cc1:CalendarExtender>
</div>
</form>
</body>
</html>
After applying the CSS, the CalendarExtender will look similar to the following:
Tweet
4 comments:
I wonder why has MS made it so difficult to change the backcolor. Is there any other simpler way?
Nice Blog!!
Why don't you use Microsoft Live Writer that will keep your code readable..you just have to use plugin for that..try it out..
Nil, thanks for your suggestion. I did try that sometime back but I remember the layout getting distorted in mozilla.
Are you using it? I will give it a try again. To be honest, I am currently using a CopyAsHtml Visual Studio pluging that formats the code as HTML. It's too cumbersome.
SyntaxHighlighter is not a bad option either
Post a Comment