rectify my login page error [Resolved]

Posted by Oswaldlily under ASP.NET on 1/6/2012 | Points: 10 | Views : 938 | Status : [Member] | Replies : 2
whatever page i entered in url it should redirect to login page
in master page i has session["Username"]

i tried to call response.redirect("login.aspx") in contentplaceholder_init() in masterpage
so whatever url entered other than login pages,it redirects to login page correctly..

but after i enter username and password and click submit still copming back to login page..




Responses

Posted by: Sksamantaray on: 1/6/2012 [Member] Silver | Points: 50

Up
0
Down

Resolved

If( session["Username"]==null)
{
//goto login page
}

Thanks,
Sanjay

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hmanjarawala on: 1/6/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi,

1st of all remove the code segment whatever you write in contentplaceholder_init()...
instead write code segment given by SK above in masterpage...you will get solution...

Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response