I have a master page which has login view control for login. I display the same login control for two different internal pages login. I want to set destination page url in the run time immediately after user is authenticated something like below.
if (MyUrl.AbsolutePath.ToUpper() == "url1")
login.DestinationPageUrl = "destinationurl1";
login.DestinationPageUrl = "destinationurl2";
but i am getting error "Object reference not set to an instance of an object." for the login control when i tried using the above code in loginbutton click event.
Please let me know where i can implement this code or is there any other easy way to implement this. I am using sql membership roles and users to login. Same user can have both the roles so that i am verifying the url instead of checking the user in role to navigate.
Thanks in advance.
View Complete Post