Hi,
I need to check the user name is there or not in another string. And if the user exist i need to display a button. else disable the button.
string finUser = "xyzcom\\design.department,xyzcom\\basil.jad,xyzcom\\aloshi.alex, xyzcom\\michel felx,xyzcom\\karim.hal,xyzcom\\shah shaan ";
string username = Page.User.Identity.Name;
if (finUser.Any(username.Contains))
{
Button2.Visible = true;
}
else
{
Button2.Visible = false;
}
i have written somthing like this. but its not working. In the string username it will display name like xyzcom\\design.department, if design dept login. pls help to solve.