Click here to Skip to main content
15,883,872 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
In my application once I have logged in successfully I have a page called as charitycommitee.aspx in which I show comments and it has an edit button.

When I click on the edit button the editor opens up and Text is Editable with update button.
Clicking on Update button redirects to this url:

http://ifintranet.imagefirst.net/Login.aspx?ReturnUrl=%2fCorporateCharities.aspx

I should be redirected to:
http://ifintranet.imagefirst.net/CorporateCharities.aspx
(with the updated Data).

Got some issue with the Return Url.

NOTE: I am not Directing anywhere in that Page

PLease Help Its Urgent.

Thank You.
Posted
Updated 29-Nov-11 22:18pm
v2
Comments
Dalek Dave 30-Nov-11 4:18am    
Edited for Grammar, Syntax and Readability.
suhailnoorpawane 30-Nov-11 5:04am    
can u help

1 solution

If you are using custom code to validate user, ensure that it actually redirects to the Returnurl, if it is valid.

Example:
C#
if (Membership.ValidateUser(userName.Text, password.Text))
{
    if (Request.QueryString["ReturnUrl"] != null)
    {
        FormsAuthentication.RedirectFromLoginPage(userName.Text, false);
    }
    else
    {
        FormsAuthentication.SetAuthCookie(userName.Text, false);
    }
}
else
{
    Response.Write("Invalid UserID and Password");
}


If this doesn't help, one would have to review your code.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900