I have created an webapi and send an empty string in webapi actionresult method. and have to check empty string check inside action method ,but empty string converted to below.
[Route("{product}/{name}")]
public IHttpActionResult GetName(string product,string Name)
{
var x = Name;
if(!string.IsNullOrEmpty(x)){
// do the logic
}
else{
}
return Ok(true);
}
why it is adding the empty as below format - format is "\"\""
webapi url be: http://localhost:60088/api/Name/GetName/Nokia/""

That is because what you send is not empty but two quotation marks (
"") in your url.The double quotation mark is displayed as
"\"\""while looking it up because it is stored as a String which is introduced by an (") then followed by two escaped quotation marks (\") and then closed by another simple quotation mark.Look here for further information on escaped Characters.
If you want to send an actual empty value you just omit that value completely.
Edit:
You might want to look up "NightOwl888's Answer on URL parameters" and/or "Web API Routing" to get yourself accustomed with Web API Routing.