I hope this is help for u
int maincount=0;
string strname = "mahi,ram,ramu,chandu,nadh";//this is database users
string strname1 = "mahi,nadh";//this is web.config users
string[] strfilter1 = strname.Split(',');
string[] strfilter2 = strname1.Split(',');
int count1 =Convert.ToInt32(strfilter1.Length);
int count2 = Convert.ToInt32(strfilter2.Length);
for(int i=0;i<strfilter1.Length;i++)
{
for (int j = 0; j < strfilter2.Length; j++)
{
if (strfilter1[i].ToString().ToUpper() == strfilter2[j].ToString().ToUpper())
{
maincount++;
}
}
}
if (maincount == count2)
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "msg", "alert('users are existed');", true);
else
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "msg", "alert('users are not existed');", true);
Mahendra
91-9908699686
Divs99, if this helps please login to Mark As Answer. | Alert Moderator