I want to pass an empty string parameter in a url. I don't know how to do it.
I am passing these parameters in the url for a grid. In the database if I using Race=''. I get the respective records. I need to pass this in the url
test.aspx?race=""
The url would look like this:
text.aspx?race=
or
text.aspx?race=&otherParam=value&etc=otherValue
Then you would have code to handle race being empty:
if(string.IsNullOrEmpty(Request.QueryString["race"]))
// handle the empty race differently
You can pass an empty string in url like this
test.aspx?race=%02%03
%02 - start of text ASCII Character
%03 - end of text ASCII Character
In this page you can find other characters too.
test.aspx?race=? OR b) those characters are included w/i the value, in which case you would need special logic to look for that string of two characters - seems undesireable. I have not tested, but I believe "(b)" is what happens.Dim race As String
race = ""
Response.Redirect("page.aspx?race=" & race)
Is this what you want??
text.aspx?race=.