Roles in ASP.NET forms authentication

  • Thread starter Thread starter Stefan Kiryazov
  • Start date Start date
S

Stefan Kiryazov

How can i remove the underline of the days in an asp:Calendar? I tried
hard with no result. I tried all of the following, and more:

<asp:Calendar
CssClass="menudark"

<asp:Calendar
DayStyle-CssClass="menudark"

<asp:Calendar
<DayStyle
Font-Underline=False

<asp:Calendar
<DayStyle
CssClass="menudark"


private void calendar_DayRender(object sender, DayRenderEventArgs e)
{
e.Cell.CssClass = "menudark";
e.Cell.Attributes["Style"] = "text-decoration: none;";

Can anyone help me?

There must be a way to change this. I searched the html source of the
page and there was no "underline". What is causing this, a css maybe?
 
Hi,

unrelated subject you have...

Anyway, text-decoration:none is the style but it should be applied to the A
element the calendar produces. For example having a style like this:

<style>
#Calendar1 A {text-decoration:none}
</style>

where Calendar1 is the ID your calendar is rendered with at client-side (as
a table). How do you include it in your style sheets is up to you. This way
it is calendar specific, but you can of course make it to apply to all
calendars (and other elements having similar structure) by:

<style>
TABLE A {text-decoration:none}
</style>

This way it might make more sense to put into global stylesheet.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist



How can i remove the underline of the days in an asp:Calendar? I tried
hard with no result. I tried all of the following, and more:

<asp:Calendar
CssClass="menudark"

<asp:Calendar
DayStyle-CssClass="menudark"

<asp:Calendar
<DayStyle
Font-Underline=False

<asp:Calendar
<DayStyle
CssClass="menudark"


private void calendar_DayRender(object sender, DayRenderEventArgs e)
{
e.Cell.CssClass = "menudark";
e.Cell.Attributes["Style"] = "text-decoration: none;";

Can anyone help me?

There must be a way to change this. I searched the html source of the
page and there was no "underline". What is causing this, a css maybe?
 
Back
Top