Checking if a user has System admin role

Find below a C# method to check if an specified user(Sent as parameter) has System Admin role. The method will return true if so. Otherwise, it will return false. Hope it helps.

Advertisements

Regular expression to check for special characters in a string

Today, I had to create a filter in which I detect if a text contains special characters. The goal of this was to ensure that the text being captured in a text field only contains letters and numbers.  To do this, I used regular expressions as this is one of the easiest ways to do … Continue reading Regular expression to check for special characters in a string