Click here to Skip to main content
15,896,063 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to disable other buttons based on user role login Pin
OriginalGriff8-Nov-19 22:30
mveOriginalGriff8-Nov-19 22:30 
AnswerRe: How to disable other buttons based on user role login Pin
Richard MacCutchan8-Nov-19 22:53
mveRichard MacCutchan8-Nov-19 22:53 
GeneralRe: How to disable other buttons based on user role login Pin
Mycroft Holmes9-Nov-19 10:21
professionalMycroft Holmes9-Nov-19 10:21 
GeneralRe: How to disable other buttons based on user role login Pin
OriginalGriff9-Nov-19 10:35
mveOriginalGriff9-Nov-19 10:35 
GeneralRe: How to disable other buttons based on user role login Pin
Richard MacCutchan9-Nov-19 20:53
mveRichard MacCutchan9-Nov-19 20:53 
GeneralRe: How to disable other buttons based on user role login Pin
Mycroft Holmes10-Nov-19 10:08
professionalMycroft Holmes10-Nov-19 10:08 
AnswerRe: How to disable other buttons based on user role login Pin
BillWoodruff9-Nov-19 20:31
professionalBillWoodruff9-Nov-19 20:31 
GeneralRe: How to disable other buttons based on user role login Pin
Eddy Vluggen10-Nov-19 2:01
professionalEddy Vluggen10-Nov-19 2:01 
We're drowning a beginner here Big Grin | :-D Still, you are right; you explained the what, I'll add the why.

When you have a button on a WinForm, you can inspect its properties. So, if I see a disabled button, I'll simply toggle the "enabled" property to gain access. If there's no button visible, I'll look at the form and check if there's an invisible button as a child. That means hiding/disabling buttons is not secure.

Use the .NET Windows Forms Spy[^]

I dislike the idea of asking the user for a password in WinForms; if need be, all assemblies can be decompiled, adapted, and recompiled. For ASP that's less of an issue - but then I'd assume an AD that does the authentication, which means you don't need to provide yet another login.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.

GeneralRe: How to disable other buttons based on user role login Pin
BillWoodruff10-Nov-19 4:24
professionalBillWoodruff10-Nov-19 4:24 
GeneralRe: How to disable other buttons based on user role login Pin
Eddy Vluggen10-Nov-19 6:16
professionalEddy Vluggen10-Nov-19 6:16 
GeneralRe: How to disable other buttons based on user role login Pin
Richard MacCutchan10-Nov-19 4:49
mveRichard MacCutchan10-Nov-19 4:49 
GeneralRe: How to disable other buttons based on user role login Pin
Eddy Vluggen10-Nov-19 6:14
professionalEddy Vluggen10-Nov-19 6:14 
GeneralRe: How to disable other buttons based on user role login Pin
Richard MacCutchan10-Nov-19 6:20
mveRichard MacCutchan10-Nov-19 6:20 
GeneralRe: How to disable other buttons based on user role login Pin
Eddy Vluggen10-Nov-19 7:32
professionalEddy Vluggen10-Nov-19 7:32 
GeneralRe: How to disable other buttons based on user role login Pin
BillWoodruff10-Nov-19 6:47
professionalBillWoodruff10-Nov-19 6:47 
GeneralRe: How to disable other buttons based on user role login Pin
Eddy Vluggen10-Nov-19 7:45
professionalEddy Vluggen10-Nov-19 7:45 
GeneralRe: How to disable other buttons based on user role login Pin
Eddy Vluggen10-Nov-19 8:01
professionalEddy Vluggen10-Nov-19 8:01 
GeneralRe: How to disable other buttons based on user role login Pin
BillWoodruff10-Nov-19 11:06
professionalBillWoodruff10-Nov-19 11:06 
GeneralRe: How to disable other buttons based on user role login Pin
Eddy Vluggen10-Nov-19 11:59
professionalEddy Vluggen10-Nov-19 11:59 
QuestionIs the command to check if the bell is running or stopped ? Pin
Member 24584677-Nov-19 20:55
Member 24584677-Nov-19 20:55 
AnswerRe: Is the command to check if the bell is running or stopped ? Pin
Richard Deeming8-Nov-19 1:39
mveRichard Deeming8-Nov-19 1:39 
GeneralRe: Is the command to check if the bell is running or stopped ? Pin
Member 245846711-Nov-19 17:45
Member 245846711-Nov-19 17:45 
GeneralRe: Is the command to check if the bell is running or stopped ? Pin
Richard Deeming12-Nov-19 0:15
mveRichard Deeming12-Nov-19 0:15 
GeneralRe: Is the command to check if the bell is running or stopped ? Pin
Member 245846712-Nov-19 14:25
Member 245846712-Nov-19 14:25 
GeneralRe: Is the command to check if the bell is running or stopped ? Pin
Richard Deeming13-Nov-19 1:30
mveRichard Deeming13-Nov-19 1:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.