<% On Error Resume Next %> <% if (Request.ServerVariables("QUERY_STRING") = "") then %>

<% Session("foo") = 1 %> <% Session.Abandon %> <% else %>

<% =Session("foo") %>

<% end if %>