how to enable and disable button based on user role?

前端 未结 6 1843
予麋鹿
予麋鹿 2021-01-13 20:22

I have a role called \'member\' and another \'admin\' in Asp.Net website.

I did before, that button should be visible or not and i am successful in that,but,i am not

6条回答
  •  说谎
    说谎 (楼主)
    2021-01-13 21:08

    Either I'm missing something or the solution is simply:

    button.Enabled = false;
    

提交回复
热议问题