Change Menu Link Color on Button Click inside ASPX page

on Jul 28, 2022 10:45 PM

Thanks tried the code

Change AnchorLink Text on ASP.Net Button Click using C# and VB.Net

No change the label lSchool still shows correctly as color=white but the menu is still black.

I set the textdesc = texte

lFound.Attributes.Add("Class", textdesc)
lSchool.Attributes.Add("Class", textdesc)
cbAll.Attributes.Add("Class", textdesc)
FontChange.Attributes.Add("class", textdesc)


.texte {
    color: White !important;
.textf {
    color: Black !important;
.textg {
    color: Blue !important;
Download FREE API for Word, Excel and PDF in ASP.Net: Download
on Jul 29, 2022 12:40 AM

Found after trying different options added this code to work

 textdescIconC = "icon-import_contacts fs " & textdesc


<a href="#about-section" class="nav-link fs mediaresize"><em class='<%=textdescIconC%>' style="margin-right: 5px;"></em><b class='<%=textdesc%>'>Import</b></a>