I have some email accounts in a if condition and making some simple decisions but this is not working here with me Please help me to find out the issue.Here is my code
if (!this.IsPostBack)
{
if ((lblemail.Text.Equals("ali.saleem@shakarganj.com.pk")) || (lblemail.Text.Equals("altaf.saleem@shakarganj.com.pk")) || (lblemail.Text.Equals("anjum.saleem@shakarganj.com.pk")) || (lblemail.Text.Equals("ibrahim.cheema@shakarganj.com.pk")) || (lblemail.Text.Equals("malik.adeel@shakarganj.com.pk")))
{
GridView2.Visible = true;
GridView1.Visible = false;
}
else
{
GridView1.Visible = true;
GridView2.Visible = false;
}
}
here i want to make an easy and proper way to handle my requirements please help me
Everything looks right. Maybe the problem is due to capitalisation or trimming? Try this: