I'm currently working on a webpage in asp.net. I have two hyperlinks and I want to make them active by applying a style sheet that makes them bolder and underlined, but for some reason it's not working.
Here is the HTML:
<li style="margin-left: 10px">
<asp:Literal ID="ltrlRegions" runat="server" Text="<%$ Resources: HRGELoggedOutMaster, Language %>"></asp:Literal>:
</li>
<li class="active1"> <asp:HyperLink ID="Lang1HyperLink" runat="server" /></li>
<li><asp:HyperLink ID="Lang2HyperLink" runat="server" /></li>
and here's the style sheet:
<style>
.active1{
font-weight: bold;
}
</style>
and this is how I'm attempting to do it using code behind:
if (Page.CurrentLanguage == 1)
{
Lang2HyperLink.CssClass = "active1";
Lang2HyperLink.Font.Bold = true;
Lang2HyperLink.Font.Underline = true;
}
else
{
Lang1HyperLink.CssClass = "active1";
Lang1HyperLink.Font.Bold = true;
Lang1HyperLink.Font.Underline = true;
}
With this code, the text becomes underlined but not bold.
Here is the resulting HTML output:
<li class="active1"> <a id="ctl00_ctl00_languageSwitcher_Lang1HyperLink" href="/AllVacancies.aspx?lang=2">Рус</a></li>
<li class="active1"><a id="ctl00_ctl00_languageSwitcher_Lang2HyperLink" class="active1" href="/AllVacancies.aspx?lang=1" style="font-weight:bold;text-decoration:underline;">Eng</a></li>
Can someone please suggest how to resolve this issue?