if statement question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

is there anything like a SQL IN statement

where x in ('123','456',789')....

available in an IF statment in aspnet?

I've got a number of possibilities for a session variable to be set equal
to, and want to avoid calling this routine if it's one of these reports. I
didn't want to have a 20 line long IF statement, but not sure how I can do
this.

any advice?

SC
 
is there anything like a SQL IN statement

where x in ('123','456',789')....

available in an IF statment in aspnet?

I've got a number of possibilities for a session variable to be set equal
to, and want to avoid calling this routine if it's one of these reports. I
didn't want to have a 20 line long IF statement, but not sure how I can do
this.

any advice?

This would depend on the language you're using, wouldn't it?

ASP.NET is not a particular language. ASP.NET pages may be written in VB.NET
or C#, or just about any other language supporting .NET.
 
is there anything like a SQL IN statement

where x in ('123','456',789')....

available in an IF statment in aspnet?

I've got a number of possibilities for a session variable to be set equal
to, and want to avoid calling this routine if it's one of these reports. I
didn't want to have a 20 line long IF statement, but not sure how I can do
this.

Not always the most concise, but, assuming vb.net (c# has a similar
thing)...

select case x
case "123", "456", 789"
' do something
case "abc", "def", "hij"
' do something else
end select
 
Back
Top