Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

i have a snippet of code that works just fine at the top of asp pages to protect pages but i need to put it on asp.net pages and it doesnt work, anyone have something that equals this?

 

<%

'If the session variable is False or does not exsist then redirect the user to the unauthorised user page

If Session("blnIsUserGood") = False or IsNull(Session("blnIsUserGood")) = True then

'Redirect to unathorised user page

Response.Redirect"unauthorised_user_page.htm"

End If

%>

 

Thanks in advance!

Posted

try

<script language="vb" runat="server">
sub page_load(Source as object, E as EventArgs)
if session("isusergood") is nothing then
response.redirect("unauthorised_user_page.htm")

You can not get ye flask.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...