how to check url has parameter in c#

45

how to check url has parameter in c# -

if(Request.QueryString != null && Request.QueryString.Count > 0)
{
     return "YES";
}
else
{
     return "NO";
}

how to check url has parameter in c# -

return Request.QueryString != null && Request.QueryString.Count > 0 ? "YES" : "NO";

how to check url has parameter in c# -

if (Request.QueryString.HasKeys())
{
    Response.Write("The requested page URI has parameters");
}

Comments

Submit
0 Comments