如何为网址设置查询字符串 [英] How to set query string for the Url

查看:144
本文介绍了如何为网址设置查询字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个查询,其中包含用单引号引起来的名称('').....

该名称在URL中显示为错误....

IT不使用单引号命名....


可能这将是查询字符串问题...

谁能纠正这个问题....

I have one query which contains name in single quotation('').....

This name cal in the url which shows some error....

IT does not take the name with single quotes....


May be this will be the query string problem...

Can anyone rectify this....

推荐答案

您需要对URL进行HTML编码

http://www.456bereastreet.com/archive/201008/what_characters_are_allowed_unencoded_in_query_strings/ [ http://msdn.microsoft.com/en-us/library/system. web.httputility.htmlencode.aspx [ ^ ]
You need to HTML encode the URL

http://www.456bereastreet.com/archive/201008/what_characters_are_allowed_unencoded_in_query_strings/[^]

http://msdn.microsoft.com/en-us/library/system.web.httputility.htmlencode.aspx[^]


这篇关于如何为网址设置查询字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆