1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Problems with "Bad Request (Invalid URL)" while input chinese characters into MS SQL

Discussion in 'C#' started by wonder_gal, Oct 18, 2005.

  1. #1
    I had came across an error known as "Bad Request (Invalid URL)" when i was trying to input chinese characters into MS SQL database using my asp written page. For your info, I'm currently working on Windows Server 2003 and running IIS 6 on this server. Can someone pls point out to me what triggers this error?

    Thanks.
     
    wonder_gal, Oct 18, 2005 IP
  2. wonder_gal

    wonder_gal Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hereby i enclosed my asp request method tat i'm using
    <%
    sCategory = request.querystring("txtCategory")
    ....
    %>

    the txtCategory textbox contains chinese characters, and after that I'll insert the sCategory string value into MS SQL database.

    Pls point out to me what possibly triggers this error. Thanks alot.
     
    wonder_gal, Oct 18, 2005 IP
  3. durango

    durango Guest

    Messages:
    83
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    With any foriegn characters, submitting them on a URL is more than likely causing the web server problems. What I suggest is don't use the GET method in your form, use POST.
     
    durango, Oct 18, 2005 IP
  4. wonder_gal

    wonder_gal Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Ya, I'm already using "post" as my form method. Is there any other errors?
     
    wonder_gal, Oct 19, 2005 IP
  5. JamieC

    JamieC Well-Known Member

    Messages:
    226
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    138
    #5
    If you're using POST, then this line: sCategory = request.querystring("txtCategory") should read sCategory = request.form("txtCategory")

    - Jamie
     
    JamieC, Oct 19, 2005 IP
  6. wonder_gal

    wonder_gal Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    oh, thanks alot
     
    wonder_gal, Oct 19, 2005 IP