* muthu wrote, On 30-7-2007 9:41:
> Hi,
> I have a homepage.aspx and lot of other pages also.Some pages are pop
> up pages which will get input from the user. now what happens is some
> users try to enter the URL of the popups directly to the browser
> window and tries to enter values.As he is logged in before, He able to
> access the pages like that. what I want is to prevent all the pages
> except the home page. if the user enters other urls it should simply
> forward them to homw page.
> Please help me
There are a couple of things you can do:
1) Check if the correct parameters are passed to the page, if they are,
allow the user through. You can check these parameters in the
Page.OnInit method and either Response.Redirect/Server transfer the user
back to the homepage.
2) Check the Referrer of the page from the server variables. You can
check this variable in the Page.OnInit and either
Response.Redirect/Server transfer the user back to the homepage.
3) In javascript on the page, check if the Opener variable is set (in
that case it's a pop-up window). If its not, use Location.Replace(new
url) to send the user back to the homepage.
This isn't something you can easily configure if that was what you were
looking for.
Jesse
|