Response.Redirect Error

H

hoz

Hi , i am developing an asp.net application (c#). I have problem :
addfovarites.aspx is protected by web.config <deny users="?" /> and my
application name is FFF . let s say when user clicks a button on some.aspx
and url is
addfovarites.aspx?myfavo=324 . If user is not authenticated , it will be
redirected to login.aspx . Everything is fine up to here . But when I try
if ( Request["ReturnUrl"]!=null)
Response.Redirect(Request.QueryString["ReturnUrl"].ToString());

else Response.Redirect("home.aspx");

i t gives you



http://localhost/addfovarites.aspx?myfavo=324 here is where I come from ,
after login I get an error like below

Object reference not set to an instance of an object.

I cant understand
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,228
Latest member
MikeMichal

Latest Threads

Top