Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8308863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:55:59+00:00 2026-06-08T18:55:59+00:00

I have some email accounts in a if condition and making some simple decisions

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T18:56:01+00:00Added an answer on June 8, 2026 at 6:56 pm

    Everything looks right. Maybe the problem is due to capitalisation or trimming? Try this:

    if ((lblemail.Text.ToLower().Trim().Equals("ali.saleem@shakarganj.com.pk")) || 
        (lblemail.Text.ToLower().Trim().Equals("altaf.saleem@shakarganj.com.pk")) ||    
        (lblemail.Text.ToLower().Trim().Equals("anjum.saleem@shakarganj.com.pk")) || 
        (lblemail.Text.ToLower().Trim().Equals("ibrahim.cheema@shakarganj.com.pk")) || 
        (lblemail.Text.ToLower().Trim().Equals("malik.adeel@shakarganj.com.pk")))
    {
        GridView2.Visible = true;
        GridView1.Visible = false;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to build a responsive email template but have run into some
I have a table with three fields, FirstName, LastName and Email. Here's some dummy
I have performed some initial research, but have not found exactly what I am
I have some tables roughly like so: Client: id name Employee id name Email
I have been asked to implement some email address validation on a web app
I have some java classes like, Class User { String email; String name; String
Is there possible, to have some projects under a certain user.name and user.email and
I have a url which has some get variables in it like: domain.com/recover?email=my@email.com&token=abc123 inside
Hi we have just noticed a bunch of Nigerian spam accounts in our email
I'm trying to send an html email to a gmail account, but for some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.