If Not value or value then....

Hi all,

I want to write a simple IF Not then statement in ASP.net 2.0 and I would like some help please.


If Not ntuser = "DOMAIN\ntuser" Or ntuser = "DOMAIN\ntuser2" Then
         Panel1.Visible = False
End If

Doesnt work, can you tell me where i'm going wrong please?

many thanks. 

2/21/2007 2:32:33 PM
asp.net.getting-started 91979 articles. 4 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 10

The first place you're going wrong is in telling us it "doesn't work" without providing any details.


Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
2/21/2007 2:44:54 PM
Use Not as stated below. It would work 
If Not (ntuser = "DOMAIN\ntuser" Or ntuser = "DOMAIN\ntuser2") Then
         Panel1.Visible = False
End If
If Not ntuser = "DOMAIN\ntuser" And Not ntuser = "DOMAIN\ntuser2" Then
         Panel1.Visible = False
End If


Mark it as answer, if it helps you.
2/21/2007 4:02:27 PM

Web resources about - If Not value or value then.... - asp.net.getting-started

US Navy Makes A Star Wars: The Force Awakens Parody
This is the Star Wars: The Force Awakens trailer parody made by the US Navy servicemen and women aboard the USS Dwight D. Eisenhower. I liked ...

Kasich Super PAC Strings Together Trump’s ‘Greatest Hits’ in New Attack Ad
The Super PAC behind Ohio Gov. John Kasich ‘s 2016 campaign released their first attack ad Monday, aimed at GOP front-runner Donald Trump . ...

Black Friday Deals: Mondo, Gallery 1988 and Phone Booth Gallery
This Black Friday Deals craziness has gotten far too big to cover on this site, but I wanted to spotlight some of the pop culture screenprint ...

Euric Cain: Suspect Arrested In Connection With Med Student Shooting
New Orlean authorities arrested a suspect today in connection to a Friday night shooting that left medical student Peter Gold in critical condition. ...

Windows 10’s fall update is deleting certain apps without asking
Windows 10 is possibly making unwanted changes to your gaming rig. Microsoft’s first big update for its operating-system-as-a-service is deleting ...

The Walking Dead Recap: Use the Stairway, Dummy!
OKAY, I'm happy that I was RIGHT about a certain character surviving, but after the jump, I'm gonna lose my GOT-DAMNED MIND over how it was done! ...

Square rolls out its new Apple Pay reader
You can now start using Apple Pay at independent shops across the country, if they are set up with Square’s newest device. On Monday, Square ...

Canada's Syrian refugee plan will keep out single men
Canada to refugees: Women and children only Single Syrian men seeking asylum will be out of luck when the Canadian government announces its ...

Thank you, 'Game of Thrones,' for coming clean about Jon Snow
To: David Benioff and Dan Weiss, Game of Thrones showrunners From: Your loyal, disgruntled audience Dear David, Dan, and the whole HBO team, ...

FAA Wants To Register Hobbyist Drones
It looks like the registration of drones is going to be a big thing now, even though you do not need to pay anyone to register your drone . Basically, ...

Resources last updated: 11/23/2015 11:06:53 PM