【发布时间】:2014-04-01 11:52:30
【问题描述】:
当我点击下面的链接时:
<a href="default.aspx/video/?title=I am trying get the string"> hi</a>
它显示为:
http://example.com/default.aspx/title/?title=I%20am%20trying%20get%20the%20string
但我希望它显示如下链接:
http://example.com/default.aspx/title/?title=I_am_trying_get_the_string
【问题讨论】:
-
%20是空间的 url 编码版本。如果你想用下划线替换它,那么你需要在你的代码中处理它。 -
@Romoku 嗨,你能指导我怎么做吗?
-
Request.QueryString["title"].Replace("_", " ")
标签: c# javascript asp.net query-string