Results 1 to 6 of 6

Thread: Error message Bad Request

  1. #1
    keroed1 Guest

    Default Error message Bad Request

    has anyone every get this message when they redirect to another webpage in a sub folder Bad Request??? whenever i do the following i get that message

    Code:
    Response.Redirect(@"Monitoring_&_Technical_Services\Road Safety\Documents.aspx");
    but if i use server.transfer it works fine.

    P.S.oh yea if i run the project from VISUAL STUDIO 2K5 the response.redirect works the problem only occurs when i am or a client machine browsing the website normally

    i am also wondering if i should just use server.transfer since i think i was reading that it is faster and puts less pressure on your web server

  2. #2
    Join Date
    Apr 2003
    Posts
    13,270
    Rep Power
    35

    Default

    What is the @ symbol doing in your response.redirect? Or was that a typo when you wrote your post?

  3. #3
    keroed1 Guest

    Default

    Quote Originally Posted by Arch_Angel View Post
    What is the @ symbol doing in your response.redirect? Or was that a typo when you wrote your post?
    the @ sign allows me to do this
    Code:
    Response.Redirect(@"Monitoring_&_Technical_Services\Road Safety\Documents.aspx");
    instead of this

    Code:
    Response.Redirect("Monitoring_&_Technical_Services\\Road Safety\\Documents.aspx");

  4. #4
    keroed1 Guest

    Default

    i just solve the problem guys it was the ampersand that was the problem

  5. #5
    Join Date
    Apr 2003
    Posts
    13,270
    Rep Power
    35

    Default

    Quote Originally Posted by keroed1 View Post
    the @ sign allows me to do this
    In all my years of coding in vbscript I have never seen that. It's not even documented in MSDN or any other site that I have googled. And no mention on MSDN that it is part of .net. Where did you get the info on using that symbol in this case?

    And I'm glad you got it figured out. But what was your solution? Renamed the directory?

  6. #6
    keroed1 Guest

    Default

    Quote Originally Posted by Arch_Angel View Post
    In all my years of coding in vbscript I have never seen that. It's not even documented in MSDN or any other site that I have googled. And no mention on MSDN that it is part of .net. Where did you get the info on using that symbol in this case?

    And I'm glad you got it figured out. But what was your solution? Renamed the directory?
    i am not using vb i am using C#. yes i just simply renamed all of my folders that had in &

    not sure where i saw it but it has been a while now since i have found and have been using it. because i was tired of because of c# recognizing \ as and escape character and forcing u to put \\ in the address parts i did search for and found a work around

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •