how i can change color of menu item with condition

HOUSSEM MAHJOUBI 286 Reputation points
2020-12-18T12:29:36.877+00:00

Hi members
i want change the color of menu item when i desable that item like this
If num(3) = False Then
Menu2.Items(4).Enabled = False
End If
i want change the color of it to brown
please help

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,254 questions
{count} votes

Accepted answer
  1. Yijing Sun-MSFT 7,066 Reputation points
    2020-12-22T06:38:10.54+00:00

    Hi @HOUSSEM MAHJOUBI ,

    As far as description, you could add font style to the menu item's text. Just like this:

    Menu1.Items[1].Text= "<font color = #A52A2A>" + Menu1.Items[1].Text + "</font>";  
    

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best regards,
    Yijing Sun


0 additional answers

Sort by: Most helpful