How to disable button menu item in cshtml

  1. #1

    How to disable button menu item in cshtml

    Hi all,
    in my cs html I have a buttom item like the following :
     X.Button().ID("Home").Text("Home").HrefTarget("_self").Href("/PastiMese/Index").Icon(Icon.House).Enable(UserPermission.Instance.IsUserInRole(wrapper, "ADMIN") || UserPermission.Instance.IsUserInRole(wrapper, "DSM")||UserPermission.Instance.IsUserInRole(wrapper,"CUO")),
    It seems the Enable property doesn't work : the button will alwas appear enabled.
    How do I have to do in order to make it woring?
    Thanks in advance,
    Simone
  2. #2
    @X.Button().ID("Home").Text("Home").HrefTarget("_self").Href("/PastiMese/Index").Icon(Icon.House).Disabled(true)
  3. #3

    [CLOSED] How to disable button menu item in cshtml

    I solved the issue.
    Thank you very much.
    Simone

Similar Threads

  1. [CLOSED] [MVC] How to disable button menu items using model
    By lawdhavmercy in forum 2.x Legacy Premium Help
    Replies: 6
    Last Post: Feb 19, 2013, 5:05 AM
  2. [CLOSED] disable lock button on menu items columns of gridPanel
    By tactime10 in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Sep 24, 2012, 3:45 PM
  3. Replies: 2
    Last Post: Apr 02, 2012, 7:48 AM
  4. Replies: 2
    Last Post: Feb 22, 2012, 4:16 PM
  5. Replies: 1
    Last Post: Jan 20, 2010, 6:08 AM

Tags for this Thread

Posting Permissions