QueryString

Discussion in 'ASP .Net' started by =?Utf-8?B?Ym9iYnk=?=, Sep 28, 2007.

  1. 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"]));
    =?Utf-8?B?Ym9iYnk=?=, Sep 28, 2007
    #1
    1. Advertising

  2. 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.

    --
    Gregory A. Beamer
    MVP, MCP: +I, SE, SD, DBA

    *************************************************
    | Think outside the box!
    |
    *************************************************
    "bobby" <> wrote in message
    news:...
    > 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"]));
    Cowboy \(Gregory A. Beamer\), Sep 28, 2007
    #2
    1. Advertising

  3. bobby wrote:
    > 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öran Andersson
    _____
    http://www.guffa.com
    =?UTF-8?B?R8O2cmFuIEFuZGVyc3Nvbg==?=, Sep 28, 2007
    #3
  4. I trued by removing Server.unldecde and tried with
    Request.QueryString["ReturnUrl"]);
    but it still doesn't work
    "Göran Andersson" wrote:

    > bobby wrote:
    > > 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öran Andersson
    > _____
    > http://www.guffa.com
    >
    =?Utf-8?B?Ym9iYnk=?=, Sep 28, 2007
    #4
  5. bobby wrote:
    > 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?

    --
    Göran Andersson
    _____
    http://www.guffa.com
    =?UTF-8?B?R8O2cmFuIEFuZGVyc3Nvbg==?=, Sep 29, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. suzy
    Replies:
    3
    Views:
    3,092
  2. Axel Dahmen

    Pack QueryString

    Axel Dahmen, Jun 29, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    535
    Axel Dahmen
    Jun 29, 2003
  3. Natty Gur

    Re: Pack QueryString

    Natty Gur, Jun 29, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    497
    Natty Gur
    Jun 29, 2003
  4. Mehdi
    Replies:
    6
    Views:
    36,109
    sloan
    Apr 6, 2006
  5. Adeel Ahmad
    Replies:
    1
    Views:
    467
    Anthony Jones
    Mar 7, 2006
Loading...

Share This Page