在URL中传递空字符串参数

use*_*657 3 vb.net asp.net url

我想在url中传递一个空字符串参数。我不知道该怎么做。

我在网格的URL中传递这些参数。在数据库中,如果我使用Race =''。我得到了各自的记录。我需要在网址中传递

test.aspx?race=""
Run Code Online (Sandbox Code Playgroud)

DLe*_*Leh 5

网址看起来像这样:

text.aspx?race=
Run Code Online (Sandbox Code Playgroud)

要么

text.aspx?race=&otherParam=value&etc=otherValue
Run Code Online (Sandbox Code Playgroud)

然后,您将获得处理种族为空的代码:

if(string.IsNullOrEmpty(Request.QueryString["race"]))
// handle the empty race differently
Run Code Online (Sandbox Code Playgroud)


小智 1

Dim race As String

race = ""

Response.Redirect("page.aspx?race=" & race)
Run Code Online (Sandbox Code Playgroud)

这是你想要的吗??