Roles in ASP.NET forms authentication

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?
 
T

Teemu Keiski

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top