QueryString

G

Guest

The ReturnUrl is: /Client/Admin.aspx
Now I want to go to admin.aspx page. My following code doesn't work

Response.Redirect(Server.UrlDecode(Request.QueryString["ReturnUrl"]));
 
C

Cowboy \(Gregory A. Beamer\)

Assuming http://www.mysite.com/login.aspx, you are trying to hit
http://www.mysite.com/Client/Admin.aspx?

Okay, first question is why you are not simply using the login abilities in
ASP.NET? If you do, you can easily restrict the admin page and force the
login. Then, it will automagically redirect without you having to rewrite
the security engine via your own code. Note, I am not stating there are no
good reasons to do this, just curious why you are not using the built in
FUD.
 
G

Guest

bobby said:
The ReturnUrl is: /Client/Admin.aspx
Now I want to go to admin.aspx page. My following code doesn't work

Response.Redirect(Server.UrlDecode(Request.QueryString["ReturnUrl"]));

The Request.QueryString[] property decodes the value for you. Just
remove the call to UrlDecode.
 
G

Guest

I trued by removing Server.unldecde and tried with
Request.QueryString["ReturnUrl"]);
but it still doesn't work
Göran Andersson said:
bobby said:
The ReturnUrl is: /Client/Admin.aspx
Now I want to go to admin.aspx page. My following code doesn't work

Response.Redirect(Server.UrlDecode(Request.QueryString["ReturnUrl"]));

The Request.QueryString[] property decodes the value for you. Just
remove the call to UrlDecode.
 
G

Guest

bobby said:
I trued by removing Server.unldecde and tried with
Request.QueryString["ReturnUrl"]);
but it still doesn't work

Could you specify "doesn't work"? What happens, and how does that differ
from what you expect?
 

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,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top