Answers for "asp.net store list in web.config"

C#
0

asp.net store list in web.config

<appSettings>
	<add key ="Users" value="Abc,xyz,test12"/>
</appSettings>
Posted by: Guest on October-21-2021
0

asp.net read list from web.config

string strUsers;

strUsers = ConfigurationManager.AppSettings["Users"].ToString();

string[] strAllUsers = strUsers.Split(',');

if (strAllUsers.ToList().Contains("Abc"))
{
  // DO OPERATION
}
else
{
  // RESTRICT
}
Posted by: Guest on October-21-2021

Code answers related to "asp.net store list in web.config"

C# Answers by Framework

Browse Popular Code Answers by Language