321
321

Reputation: 667

Session Variable Attached to String

I want to show the following string result only if the session variable Session("PublicGID") is set:

<% = strDB_DirectoryBannerImage %>

How would I go about it?

Upvotes: 1

Views: 70

Answers (1)

BradBrening
BradBrening

Reputation: 5518

You could try something like this:

<%
If Session("PublicGID") <> "" Then
  Response.Write(strDB_DirectoryBannerImage)
End If
%>

Or, to be more compact:

<% If Session("PublicGID") <> "" Then Response.Write(strDB_DirectoryBannerImage) %>

Upvotes: 2

Related Questions