Forums

ASP

This topic is locked

restrictions on when a page can be loaded ...

Posted 18 Apr 2002 16:43:33
1
has voted
18 Apr 2002 16:43:33 Santosh Krishnan posted:
Hi Guys,

Simple question for you. You could just tell me which book to look at for this.

I have a sequence of pages that I created, and it starts with the login page and so on and so forth. But currently, someone could type in the link for a page further down the chain and it would pull up.

I know how to restrict that in JSP, but how do I do so in JSP? I want my page to say, "Please log in first", and then pull up an error page. In JSP, I would put a simple if statement in the first few lines of the page to check for the session bean and if necessary, a variable that is required (such as the user ID). If it were non existant or blank, I'd throw out the error.

So the same thing in ASP - how?

Thanks a lot.

Santosh

P.S.: On a related topic, in JSP, I can put an JSP tag that'll assign a pre-fab HTML for errors. So if the DB were to spit out an error, the user would get this boilerplate HTML. How can I do that in ASP?

Replies

Replied 18 Apr 2002 22:48:11
18 Apr 2002 22:48:11 Viktor Farcic replied:
On Login you can assign Session variable and later check if it exists:
<%
If Session("whatever" <> "" Then
...
End If
%>

Also, there are Login & Restrict Access server behaviors in UD that can do that for you.

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Hi Guys,

Simple question for you. You could just tell me which book to look at for this.

I have a sequence of pages that I created, and it starts with the login page and so on and so forth. But currently, someone could type in the link for a page further down the chain and it would pull up.

I know how to restrict that in JSP, but how do I do so in JSP? I want my page to say, "Please log in first", and then pull up an error page. In JSP, I would put a simple if statement in the first few lines of the page to check for the session bean and if necessary, a variable that is required (such as the user ID). If it were non existant or blank, I'd throw out the error.

So the same thing in ASP - how?

Thanks a lot.

Santosh

P.S.: On a related topic, in JSP, I can put an JSP tag that'll assign a pre-fab HTML for errors. So if the DB were to spit out an error, the user would get this boilerplate HTML. How can I do that in ASP?
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Viktor Farcic

TalkZone Manager

Reply to this topic