我想在url中传递一个空字符串参数。我不知道怎么做。
我在网格的url中传递这些参数。在数据库中如果我使用Race =''。我得到了各自的记录。我需要在URL中传递这个
test.aspx?race=""
答案 0 :(得分:4)
网址看起来像这样:
text.aspx?race=
或
text.aspx?race=&otherParam=value&etc=otherValue
然后您将拥有处理种族空的代码:
if(string.IsNullOrEmpty(Request.QueryString["race"]))
// handle the empty race differently
答案 1 :(得分:1)
Dim race As String
race = ""
Response.Redirect("page.aspx?race=" & race)
这是你想要的吗?
答案 2 :(得分:1)