Reputation: 169
I am working with some classic asp for a project. I have run some syntax that I am unfamiliar with multiple times.
Here is an example:
if Request.QueryString("viewpopup") <> "" then
queryString = "?viewpopup=" & Request.QueryString("viewpopup")
end if
What I am attempting to identify is what the <> and the "" does in the first line of this statement.
Upvotes: 2
Views: 245
Reputation: 11527
In classic asp <>
is the "not equal to" operator.
""
is an empty string.
So basically it is checking to see if the incoming query string contains an item viewpopup
that has a value, and if so set a variable called queryString
to have that same variable and value.
Upvotes: 5
Reputation: 2501
It's hard to know what the original intent was. But my guess would be that the writer wanted to test to see if that particular parameter (viewpopup) was provided in the query string. The equivalent could have been:
If Not (Request.QueryString("viewpopup") Is Nothing) Then ....
Upvotes: 1