Doubt related with Returnurl [Resolved]

Posted by Amritha444 under ASP.NET on 1/30/2013 | Points: 10 | Views : 1135 | Status : [Member] | Replies : 1
Hi all

I placed login section in master page after login of user this section will be invisible . im redirecting pages to index.aspx page which is inside a folder abc. problem is when redirecting url with querystring return url
if (Request.QueryString["ReturnUrl"] == null)
{
returnUrl = "~/hr/hr.aspx"
}


else
{
returnUrl = Request.QueryString["ReturnUrl";
}
Response.Redirect(returnUrl);
im using this code.but else part leads to exception return url concatenates with abc folder like www.abc.com/mainfolder of application/abc/returnurl instead i want www.abc.com/mainfolder of application/returnurl . why happening so? How to overcome this

Thanks in Advance
Amrutha




Responses

Posted by: Amritha444 on: 1/30/2013 [Member] Starter | Points: 25

Up
0
Down

Resolved
hi all


I added a ~/ before url and its working fine

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

Login to post response