Get value from AJAX using Javascript and ASP

前端 未结 9 1032
轮回少年
轮回少年 2020-12-02 01:44

I am using this Ajax code. But I dont know how i will retrieve my value of value1 on my server-side asp using Javascript.

On my serverside I want to have something

9条回答
  •  一整个雨季
    2020-12-02 02:14

    xmlHttp.send correctly writen

    • It doesn't check that you have a 200 status before trying to deal with the data.
    • It fails to encode the data to make sure it is URL safe

    I would suggest using a library to handle XHR stuff, instead of reinventing the wheel. Microjs has a list of lots of small libraries if you aren't using one of the large ones (such as YUI or jQuery).

    how do I get the values on the server-side using Javascript.

    It is just query string data, so it will be in Request.QueryString.

提交回复
热议问题