Get Classic ASP variable from posted JSON

后端 未结 8 1984
挽巷
挽巷 2021-02-08 11:01

I\'m trying to post JSON via AJAX to a Classic ASP page, which retrieves the value, checks a database and returns JSON to the original page.

I can post JSON via AJAX. I

8条回答
  •  情话喂你
    2021-02-08 11:39

    You can find all posted parameters via this code.

    FUNCTION getQueryString()
        dim queryLink, queryItemName
        queryLink = ""
        On error Resume Next
        For each queryItemName in Request.QueryString
            Execute(queryItemName & " = stripQuery(Request.QueryString(""" & queryItemName & """))")
            queryLink = queryLink & "&" & queryItemName & "=" & Request.QueryString(queryItemName)
        Next
        For each queryItemName in Request.Form
            Execute(queryItemName & " = stripQuery(Request.Form(""" & queryItemName & """))")
            queryLink = queryLink & "&" & queryItemName & "=" & Request.Form(queryItemName)
        Next
        On Error Goto 0
        getQueryString = queryLink
    END FUNCTION
    
    response.write getQueryString()
    

提交回复
热议问题