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
You have to set the Button.Enabled property value to according to the HttpContext.Current.User.IsInRole("admin") function returned value.
Button.Enabled
HttpContext.Current.User.IsInRole("admin")
Either in html:
Or in code behind:
Button.Enabled = HttpContext.Current.User.IsInRole("Admin");