InnerHtml of HtmlDocument not changing - c#

I'm trying to build an email template using html agility pack.
I'm firstly getting the base layout:
public static HtmlDocument GetLayout()
{
string path = #"Modules\RoomBookingShared\Resources\EmailTemplate.html";
HtmlDocument document = new HtmlDocument();
document.Load(path);
return document;
}
With a created HtmlNode i'm trying to write it to the inner of a specific element in the Html.
public static HtmlDocument SetBody(string body, HtmlDocument document)
{
string path = #"Modules\RoomBookingShared\Resources\test.html";
HtmlDocument item = new HtmlDocument();
item.Load(path);
document.GetElementbyId("body-area").ChildNodes.Add(item.DocumentNode);
FileStream sw = new FileStream("FileStream.html", FileMode.Create);
document.Save(sw);
return document;
}
This is not setting and instead is just sending the layout file. What's strange, is if i write out the file (see the filestream code) it writes out the Html file correctly.
The output that should get added (minus data) is the following:
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td class="fallback-text maven" style="padding: 10px 25px 10px 25px; mso-height-rule: exactly; background-color: #343A40; border: 1px solid #454D55; color: white; text-align: center;">Location</td>
<td class="fallback-text titillium" style="padding: 10px 25px 10px 25px; mso-height-rule: exactly; border: 1px solid #DEE2E6;"></td>
</tr>
<tr>
<td class="fallback-text maven" style="padding: 10px 25px 10px 25px; mso-height-rule: exactly; background-color: #343A40; border: 1px solid #454D55; color: white; text-align: center;">Date & Time</td>
<td class="fallback-text titillium" style="padding: 10px 25px 10px 25px; mso-height-rule: exactly; border: 1px solid #DEE2E6;"></td>
</tr>
<tr>
<td class="fallback-text maven" style="padding: 10px 25px 10px 25px; mso-height-rule: exactly; background-color: #343A40; border: 1px solid #454D55; color: white; text-align: center;">Required </td>
<td class="fallback-text titillium" style="padding: 10px 25px 10px 25px; mso-height-rule: exactly; border: 1px solid #DEE2E6;"></td>
</tr>
<tr>
<td class="fallback-text maven" style="padding: 10px 25px 10px 25px; mso-height-rule: exactly; background-color: #343A40; border: 1px solid #454D55; color: white; text-align: center;">Attendees</td>
<td class="fallback-text titillium" style="padding: 10px 25px 10px 25px; mso-height-rule: exactly; border: 1px solid #DEE2E6;"></td>
</tr>
<tr>
<td class="fallback-text maven" style="padding: 10px 25px 10px 25px; mso-height-rule: exactly; background-color: #343A40; border: 1px solid #454D55; color: white; text-align: center;">Booking Reason</td>
<td class="fallback-text titillium" style="padding: 10px 25px 10px 25px; mso-height-rule: exactly; border: 1px solid #DEE2E6;"></td>
</tr>
<tr>
<td class="fallback-text maven" style="padding: 10px 25px 10px 25px; mso-height-rule: exactly; background-color: #343A40; border: 1px solid #454D55; color: white; text-align: center;">Reference</td>
<td class="fallback-text titillium" style="padding: 10px 25px 10px 25px; mso-height-rule: exactly; border: 1px solid #DEE2E6;"></td>
</tr>
</table>
Can anyone see what i'm doing wrong?

The issue seems to be to do with ParsedText and Text.
To fix this, i had to use the following:
Body = final.DocumentNode.OuterHtml;

Related

the :disabled attribute on my button does not seem to work

I'm having trouble with the style for a disabled button.
The enabled button works, the hover works but the disabled button reverts to the default? style:
CSS:
.smlbutton:enabled{
color: #fff;
background-color: #1d60ff;
height: 20px;
width: 18px;
padding: 0px;
border: none 0px transparent;
font-size: 7px;
font-weight: lighter;
webkit-border-radius: 20px 10px 10px 10px;
-moz-border-radius: 9px 10px 10px 10px;
border-radius: 5px 20px 20px 20px;
}
.smlbutton:hover{
color: #fff;
background-color: #1d60ff;
height: 22px;
width: 18px;
padding: 0px;
border: none 0px transparent;
font-size: 7px;
font-weight: lighter;
webkit-border-radius: 20px 10px 10px 10px;
-moz-border-radius: 9px 10px 10px 10px;
border-radius: 5px 20px 20px 20px;
}
.smlbutton:disabled,.smlbutton.disabled{
color: #fff;
background-color: #1d60ff;
height: 200px;
width: 18px;
padding: 0px;
border: none 0px transparent;
font-size: 7px;
font-weight: lighter;
webkit-border-radius: 20px 10px 10px 10px;
-moz-border-radius: 9px 10px 10px 10px;
border-radius: 5px 20px 20px 20px;
The ASPX:
<asp:TemplateField HeaderText="Approval Drawings Approved" Visible="true">
<ItemTemplate>
<asp:TextBox ID="tbApprovals" runat="server" Text='<%# Bind("Approvals", "{0:MM/dd/yy}") %>' AutoPostBack="true" Enabled="true" OnTextChanged="tbDate_OnTextChangeApprovals" Width="100px"></asp:TextBox>
<ajaxToolkit:CalendarExtender ID="tbApprovals_CalendarExtender" runat="server" TargetControlID="tbApprovals" />
<asp:Button ID="btnApprovalsConvertToBaseline" class="smlbutton" runat="server" Text="B." OnClick="btnApprovalsConvertToBaseline_Click" Enabled="FALSE" />
<asp:Button ID="btnApprovalsCompleteTask" class="smlbutton" runat="server" Text="D." OnClick="btnApprovalsCompleteTask_Click" Enabled="FALSE" />
<asp:Button ID="btnApprovalsCompleteTaskOnTime" class="smlbutton" runat="server" Text="DOT" OnClick="btnApprovalsCompleteTaskOnTime_Click" Enabled="FALSE" />
</ItemTemplate>
</asp:TemplateField>
I enable the button using this c#
try
{
TextBox tempApprovals = (TextBox)e.Row.Cells[9].FindControl("tbApprovals");
DateTime myDateApprovals = DateTime.ParseExact(tempApprovals.Text.ToString(), "yyyy-MM-dd",
System.Globalization.CultureInfo.InvariantCulture);
if (myDateApprovals <= DateTime.Now.Date && e.Row.Cells[10].Text != "Actual")
{
tempApprovals.ForeColor = System.Drawing.Color.Red;
tempApprovals.Font.Bold = true;
}
Button btnApprovals = (Button)e.Row.Cells[9].FindControl("btnApprovalsConvertToBaseline");
Button btnApprovals2 = (Button)e.Row.Cells[9].FindControl("btnApprovalsCompleteTask");
Button btnApprovals3 = (Button)e.Row.Cells[9].FindControl("btnApprovalsCompleteTaskOnTime");
if (e.Row.Cells[10].Text.ToString() == "Forecast")
{
btnApprovals.Enabled = true;
}
if (e.Row.Cells[10].Text.ToString() == "Baseline")
{
btnApprovals.Enabled = false;
btnApprovals2.Enabled = true;
btnApprovals3.Enabled = true;
}
if (e.Row.Cells[10].Text.ToString() == "Adjusted")
{
btnApprovals.Enabled = false;
btnApprovals2.Enabled = true;
btnApprovals3.Enabled = true;
}
if (e.Row.Cells[10].Text.ToString() == "Actual")
{
btnApprovals2.Enabled = false;
btnApprovals3.Enabled = false;
}
}
catch { }
}
You do not need to style each pseudo-class. Instead, let inherit from parent.
.smlbutton {
color: #fff;
background-color: #1d60ff;
height: 22px;
width: 18px;
padding: 0px;
border: none 0px transparent;
font-size: 7px;
font-weight: lighter;
webkit-border-radius: 20px 10px 10px 10px;
-moz-border-radius: 9px 10px 10px 10px;
border-radius: 5px 20px 20px 20px;
}
.smlbutton:disabled,
.smlbutton[disabled] {
background-color: #0f0;
}
.smlbutton:hover {
background-color: #f00;
}

Complete border on page of print of Web page

I am having a web page and on button of print.
when i click on that button i am trying to print that web page
Here is my button
<asp:ImageButton ID="ImageButton1" runat="server" ToolTip="Cancel" AlternateText="Print"
ImageUrl="~/admin/images/print_btn.png" OnClientClick='javascript:window.print();' />
My web page contains more than 3 print page. I have set a border on Media Print.
but it is not working properly.
there is only one bottom border that is at the last page.
I need borders on each page of print.
Is it possible using javascript or jquery?
if it is possible using c# then also let me know
here is my code
<style type="text/css">
#media print
{
.TblBorder
{
border-collapse: collapse;
border: solid 1px black;
}
.TblBorder td
{
border: solid 1px black;
}
.TblBorder th
{
border: solid 1px black;
}
}
</style>
<table width="100%" cellpadding="8" cellspacing="2">
<tr class="printable">
<td colspan="3" align="center" style="color: Black; font-family: Calibri; font-size: 18px;
font-weight: bold">
<asp:Label ID="lblHeading" runat="server" Text=""></asp:Label>
</td>
</tr>
<tr class="non-printable" visible="false" runat="server" id="trPrintPlantandMachinery">
<td colspan="3" align="left">
<asp:LinkButton ID="lnkbtnPlantMachinery" runat="server" CssClass="left_panel" Text="<b>1. Download & Print Plant & Machinery List</b>"
OnClick="lnkbtnPlantMachinery_Click" Font-Underline="true"></asp:LinkButton>
</td>
</tr>
<tr class="printable">
<td style="font-family: calibri; font-size: 14px; font-weight: bold; color: Black;"
width="49%">
Date of Visit the Enterprise
</td>
<td style="font-family: calibri; font-size: 14px; font-weight: bold; color: Black;"
width="1%">
:
</td>
<td width="50%" style="font-family: calibri; font-size: 15px; font-weight: bold;">
<asp:Label ID="txtDateofVisit" runat="server"></asp:Label>
</td>
</tr>
<tr class="printable">
<td style="font-family: calibri; font-size: 14px; font-weight: bold; color: Black;"
width="49%">
Application Number
</td>
<td style="font-family: calibri; font-size: 14px; font-weight: bold; color: Black;"
width="1%">
:
</td>
<td width="50%" style="font-family: calibri; font-size: 15px; font-weight: bold;">
<asp:Label ID="lblApplicationNo" runat="server" Text="-"></asp:Label>
</td>
</tr>
<tr class="printable">
<td width="49%" style="font-family: calibri; font-size: 14px; font-weight: bold;
color: Black;">
Scheme Name
</td>
<td width="1%" style="font-family: calibri; font-size: 14px; font-weight: bold; color: Black;">
:
</td>
<td width="50%" style="font-family: calibri; font-size: 15px; font-weight: bold;">
<asp:Label ID="lblSchemeName" runat="server"></asp:Label>
</td>
</tr>
<tr class="printable">
<td width="49%" style="font-family: calibri; font-size: 14px; font-weight: bold;
color: Black;">
Name of Enterprise
</td>
<td width="1%" style="font-family: calibri; font-size: 14px; font-weight: bold; color: Black;">
:
</td>
<td width="50%" style="font-family: calibri; font-size: 15px; font-weight: bold;">
<asp:Label ID="lblUnitName" runat="server" Text="-"></asp:Label>
</td>
</tr>
<tr class="printable">
<td width="49%" style="font-family: calibri; font-size: 14px; font-weight: bold;
color: Black;">
Enterprise Address
</td>
<td width="1%" style="font-family: calibri; font-size: 14px; font-weight: bold; color: Black;">
:
</td>
<td width="50%" style="font-family: calibri; font-size: 15px; font-weight: bold;">
<asp:Label ID="lblIndustryUnitAddress" runat="server" Text="-"></asp:Label>
</td>
</tr>
</table>
<table width="100%" cellpadding="5" cellspacing="2" border="0">
<tr>
<td style="font-family: calibri; font-size: 14px; font-weight: bold; color: Black;"
width="49%">
Constitution of The Unit
</td>
<td style="font-family: calibri; font-size: 14px; font-weight: bold; color: Black;"
width="1%">
:
</td>
<td width="50%" style="font-family: calibri; font-size: 15px; font-weight: bold;">
<asp:Label ID="lblConstitutionUnit" runat="server" Text="-"></asp:Label>
</td>
</tr>
<tr>
<td style="font-family: calibri; font-size: 16px; font-weight: bold; color: Black"
colspan="3">
<u>Entrepreneur's Profile Details</u>
</td>
</tr>
</table>

Webcontrols from a repeater control loose their value

It seams that the solution for this problem would be what it is said in this post: http://codinglifestyle.wordpress.com/2009/10/08/repeaters-and-lost-data-after-postback-viewstate/ however it seams that for me does not work :|
So I have a page and in that page a repeater that has 3 webcontrols.
<asp:Repeater ID="repFissaggio" runat="server" OnItemCreated="repFissaggio_ItemCreated" EnableViewState="true" >
<ItemTemplate>
<table width="100%">
<tr>
<td style="width:30%;border: gray 1px solid;">
<div style="text-align: center; width:100%; border-right: gray 1px solid; border-top: gray 1px solid; border-left: gray 1px solid;border-bottom: gray 1px solid; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-WEIGHT: bold; FONT-SIZE: 12px; background-color:gainsboro;">Disegno Articolo</div>
<asp:Image runat="server" ImageUrl='<%# GetFileAddress(Container.DataItem) %>' Width='220px' ID="imgDisegnoArt" EnableViewState="false"></asp:Image>
</td>
<td style="width:65%">
<div style="text-align: center; width:100%; border-right: gray 1px solid; border-top: gray 1px solid; border-left: gray 1px solid;border-bottom: gray 1px solid; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-WEIGHT: bold; FONT-SIZE: 12px; background-color:gainsboro;">Informazioni Articolo</div>
<gsc:SchSolettoFinissaggioArticoloUC ID="ucSchSolettoFinissaggioArticolo" runat="server"></gsc:SchSolettoFinissaggioArticoloUC>
</td>
</tr>
<tr>
<td style="border: gray 1px solid;">
<div style="text-align: center; width:100%; border-right: gray 1px solid; border-top: gray 1px solid; border-left: gray 1px solid;border-bottom: gray 1px solid; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-WEIGHT: bold; FONT-SIZE: 12px; background-color:gainsboro;">Schema Finissaggio</div>
<asp:Image runat="server" ImageUrl='<%# GetFileAddress(Container.DataItem) %>' Width='220px' ID="imgSchedaFissaggio" EnableViewState="false"></asp:Image>
<asp:Label ID="divfileName" runat="server" Text='<%# GetFileName(Container.DataItem) %>' style="text-align: center; width:100%"></asp:Label>
</td>
<td>
<fieldset style="padding: 10px,10px,10px,10px; border-bottom-width: 5px">
<legend>Sistema di Industrializzazione</legend>
<gsc:SchSolettoSistemaProdIndusUC ID="ucSchSolettoSistemaIndus" runat="server"></gsc:SchSolettoSistemaProdIndusUC>
</fieldset>
<br />
<fieldset style="padding: 10px,10px,10px,10px; border-bottom-width: 5px">
<legend>Sistema di Produzione</legend>
<gsc:SchSolettoSistemaProdIndusUC ID="ucSchSolettoSistemaProd" runat="server"></gsc:SchSolettoSistemaProdIndusUC>
</fieldset>
</td>
</tr>
</table>
</ItemTemplate>
</asp:Repeater>
On init I call this method
protected override void InitEditor()
{
if (!IsPostBack)
{
...
repFissaggio.DataSource = SolettoDS.SoleXSchTec;
repFissaggio.DataBind();
}
}
Above this repeater I have other webcontrols. When I change a value of a dropdown the form is submitted. When that happens values of webcontrol from repeater looses their value.
What do you suggest to do?
Thanks.
I found the answer: I should put binding in protected void repFissaggio_ItemDataBound(object sender, RepeaterItemEventArgs e) and not in repFissaggio_ItemCreated

Implement a html-widget (form) into an asp-site

I try to implement the following widget in my asp.net-site:
<div style="width: 175px; margin: 0px; padding: 0px; text-align: right; background-color:#FFFFFF;">
<img src="http://fahrplan.sbb.ch/img/igm-sbblogo.gif" width="110" height="18" alt="SBB|CFF|FFS" />
<h1 style="width:175px; background-color: #DDDDDD; color: #000000; font-family: Arial, Helvetica, sans-serif; font-size:12px; font-weight: bold; padding: 2px 0px; margin: 0; height: 15px; text-align: left;clear:both;"> Fahrplan</h1>
<div style="width: 100%; background-color: #F8F8F8; margin: 0; padding: 0px;" summary="Layout">
<form action="http://fahrplan.sbb.ch/bin/query.exe/dn?externalCall=yes&DCSext.wt_fp_request=partner_mini" name="formular" method="post" style="display:inline" target="_blank">
<input type="hidden" name="queryPageDisplayed" value="yes">
<table cellspacing="0" cellpadding="4" style="width: 170px; margin: 2px;" class="ig">
<tr>
<th nowrap="nowrap" style="font-family:Arial, Helvetica, sans-serif; font-size:12px; text-align:left; vertical-align:middle; font-weight:bold; width: 55px;">
Von:
</th>
<td style="font-family:Arial, Helvetica, sans-serif; font-size:12px; text-align:left; vertical-align:middle; padding:2px 3px 2px 0px;" colspan="2">
<input type="hidden" name="REQ0JourneyStopsSID" value="A=1#O=Stettbach, Bahnhof#X=8596132#Y=47397270#U=85#L=008591065#B=1#p=1338878028#">
<span style="font-weight:bold;">Stettbach, Bahnhof</span>
</td>
</tr>
<tr>
<td style="font-family:Arial, Helvetica, sans-serif; font-size:12px; text-align:left; vertical-align:middle; padding:2px 3px 2px 0px;">
<select name="REQ0JourneyStopsZA" style="background-color:#fff; border: 1px solid #7F9DB9; color: #000; width: 60px; font-size:11px; margin:0px 0px;">
<option selected="selected" value="7">Nach:</option>
<option value="1">Bhf./Haltest.</option>
<option value="2">Ort, Strasse Nr.</option>
<option value="4">Sehenswürdigkeit</option>
</select>
</td>
<td style="font-family:Arial, Helvetica, sans-serif; font-size:12px; text-align:left; vertical-align:middle; padding:2px 3px 2px 0px;" colspan="2">
<input type="text" name="REQ0JourneyStopsZG" value="" size="16" style="background-color:#fff; border: 1px solid #7F9DB9; color: #000; width: 100px; height: 18px; font-size: 11px" accesskey="t" tabindex="2">
<input type="hidden" name="REQ0JourneyStopsZID">
</td>
</tr>
<tr>
<th nowrap="nowrap" style="font-family:Arial, Helvetica, sans-serif; font-size:12px; text-align:left; vertical-align:middle; font-weight:bold; width: 55px;">
Datum:
</th>
<td nowrap="nowrap" style="font-family:Arial, Helvetica, sans-serif; font-size:12px; text-align:left; vertical-align:middle; padding:2px 3px 2px 0px;">
<b>08.06.12</b>
<input type="hidden" name="REQ0JourneyDate" value="08.06.12" accesskey="d">
</td>
</tr>
<tr>
<th nowrap="nowrap" style="font-family:Arial, Helvetica, sans-serif; font-size:12px; text-align:left; vertical-align:middle; font-weight:bold; width: 55px;">
Zeit:
</th>
<td nowrap="nowrap" style="font-family:Arial, Helvetica, sans-serif; font-size:12px; text-align:left; vertical-align:middle; padding:2px 3px 2px 0px;">
<input type="text" name="REQ0JourneyTime" value="11:02" size="5" maxlength="5" style="background-color:#fff; border: 1px solid #7F9DB9; color: #000; width: 100px; height: 18px; font-size: 11px" accesskey="c" tabindex="4">
</td>
</tr>
<tr>
<th> </th>
<td nowrap="nowrap" style="font-family:Arial, Helvetica, sans-serif; font-size:12px; text-align:left; vertical-align:middle; padding:2px 3px 2px 0px;">
<input class="radio" type="radio" name="REQ0HafasSearchForw" value="1" checked style="margin-right:3px;">Abfahrt
<br /><input class="radio" type="radio" name="REQ0HafasSearchForw" value="0" style="margin-right:3px;">Ankunft
</td>
</tr>
<tr>
<td colspan="2" style="text-align:left;">
<input type="hidden" name="start" value="Suchen">
<input type="submit" name="start" value="Verbindung suchen" tabindex="5" style="font-family:Arial, Helvetica, sans-serif; font-size:12px; text-align:center; width:130px; vertical-align: middle; cursor:pointer; -moz-border-radius: 3px 3px 3px 3px; background-color:#EE0000; border:1px solid #B20000; color:#FFFFFF; font-weight:bold; height:auto; line-height:20px; padding:0px 10px; text-decoration:none; white-space:nowrap;">
</td>
</tr>
<tr>
<td colspan="2" style="text-align:left;">
<a style="font-family:Arial,Helvetica,sans-serif; font-size:12px; text-align:left; margin-top:4px; color: #6B7786; text-decoration:none; display:block;" href="http://www.sbb.ch/166" target="_blank" title="Aktuelle Informationen zu Streiks und grösseren Unterbrüchen im Schienenverkehr."><img src="http://fahrplan.sbb.ch/img/one/icon_arrow_right.png" alt="" style="vertical-align:top; padding-right:2px; border:none;" />Bahnverkehrsinformation</a>
</td>
</tr>
</table>
</form>
</div>
</div>
<script language="JavaScript1.2" type="text/javascript">
/* <![CDATA[ */
var time=new Date();
var hour = time.getHours(); hour=(hour<10)? '0'+hour:hour;
var minute = time.getMinutes();minute=(minute<10)? '0'+minute:minute;
var travelTime = hour+':'+minute;
document.formular.REQ0JourneyTime.value=travelTime;
// /* ]]> */
</script>
Source of the code: http://fahrplan.sbb.ch/bin/help.exe/en?application=INPUTGEN&tpl=inputgen_start
When I create a normal HTML-site the widget works without problems.
But in an asp-site there is a problem with the javascript.
In the line "document.formular.REQ0JourneyTime.value=travelTime;" there comes this error-message:
"JScript runtime error: The property "REQ0JourneyTime" can not be retrieved value: The object is null or undefined."
I think the problem has something to do with the form-tag of the widget ands the post-action, but I doent know, what exactly it is :S
Does somebody know how to fix that issue? Thank you very much!
Michael
You should probably be accessing the form by document.forms.formular or document.forms['formular'], not document.formular.
Also, on the end of the <input ... name="REQ0JourneyTime" ... /> you have > not />.
I think you have nested an HTML form inside your ASPX server-side form tag.
Form tag on ASP.net page
You could try using AJaX within your widget rather than posting back via traditions form.
Read this article too: http://msdn.microsoft.com/en-us/magazine/cc164151.aspx

ASP.NET Menu Spacing Issue with Drop Down Arrow

I have an ASP.NET menu and for the items that contain a drop down menu, it displays an arrow in a new <td>, the problem is the spacing is horrible. How do i tap into that <TD> or lessen the spacing between the menu text and Arrow?
Screenshot of menu issue:
HTML Output:
<td style="white-space:nowrap;">
<a class="ctl00_itemMenu_1 StaticMenuItemStyle ctl00_itemMenu_3" style="border-style:none;font-size:1em;" href="Default.aspx"> Home </a>
</td>
<td style="width:0;">
<img style="border-style:none;vertical-align:middle;" alt="Expand Home" src="Images/menu_arrow.gif">
</td>
Menu Control:
<asp:Menu ID="itemMenu" SkinID="MenuSkin" runat="server" Orientation="Horizontal"
CssClass="menu" DynamicItemFormatString=" {0} " StaticItemFormatString=" {0} "
StaticEnableDefaultPopOutImage="true" StaticPopOutImageUrl="~/Images/menu_arrow.gif"
DynamicPopOutImageUrl="~/Images/menu_arrow_dynamic.gif" DynamicEnableDefaultPopOutImage="true"
MaximumDynamicDisplayLevels="5">
<StaticMenuStyle CssClass="StaticMenuStyle" />
<StaticMenuItemStyle Width="100%" CssClass="StaticMenuItemStyle" />
<StaticHoverStyle CssClass="StaticHoverStyle" />
<DynamicMenuStyle CssClass="DynamicMenuStyle" />
<DynamicMenuItemStyle CssClass="DynamicMenuItemStyle" Width="100%" />
<DynamicHoverStyle CssClass="DynamicHoverStyle" />
</asp:Menu>
CSS:
.menu
{
padding: 0px 0px 0px 7px;
margin:0px;
}
.StaticMenuStyle a, .StaticMenuStyle a:visited, .StaticMenuStyle a:active, .StaticMenuStyle a:hover
{
color: #ffffff;
text-decoration: none;
padding: 3px 9px 3px 9px;
height: 100%;
display: table;
font-weight: bold;
font-family: Tahoma, Arial;
}
.DynamicMenuStyle a, .DynamicMenuStyle a:visited, .DynamicMenuStyle a:active, .DynamicMenuStyle a:hover
{
color: #ffffff;
text-decoration: none;
padding: 7px 9px 7px 9px;
width: 100%;
height: 100%;
display: table;
font-weight: bold;
font-family: Tahoma, Arial;
}
.StaticMenuStyle td
{
font-weight: normal;
height: 100%;
font-size: 11px;
border-collapse: collapse;
/*cursor: pointer;*/
}
.DynamicMenuStyle table
{
border-collapse: collapse;
border-spacing: 0px;
}
.DynamicMenuStyle td
{
border: solid 1px #ffffff;
font-weight: normal;
width: 100%;
height: 100%;
/*cursor: pointer;*/
background-color: #333333;
border-collapse: collapse;
border-spacing: 0px;
font-size: 11px;
}
.DynamicMenuStyle td table tr td
{
border: solid 0px #ffffff;
padding: 7px 4px;
}
.StaticMenuItemStyle td
{
padding: 7px 0px 7px 0px;
border: 0px solid #ffffff;
font-weight: normal;
text-align: left;
}
.StaticHoverStyle td, .DynamicHoverStyle td
{
background-color: #5c5c5c;
font-weight: bold;
}
.StaticSelectedStyle, .DynamicSelectedStyle
{
font-weight: normal;
cursor: pointer;
}

Categories

Resources