Classic ASP Request.Form removes spaces?

孤街醉人 提交于 2020-01-04 11:08:46

问题


I'm trying to figure this oddity out... in classic ASP i seem to be losing spaces in Request.Form values...

ie, Request.Form("json") is

{"project":{"...","administrator":"AlexGorbatchev",
"anonymousViewUrl":null,"assets":[],"availableFrom":"6/10/20104:15PM"...

However, CStr(Request.Form) is

json={"project":{"__type":"...":"Alex Gorbatchev",
"anonymousViewUrl":null,"assets":[],"availableFrom":"6/10/2010 4:15 PM"...

Here's the entire code :)

<%@ language="VBSCRIPT"%>
<%
Response.Write(CStr(Request.Form("json")))
Response.Write(CStr(Request.Form))
%>

Somebody please tell me I haven't lost all my marbles...


回答1:


aaand I found the problem 5 minutes after... as usual :) posted values need to be url encoded.



来源:https://stackoverflow.com/questions/3018548/classic-asp-request-form-removes-spaces

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!