asp net query string code example
Example 1: querstring fromat asp.net c#
public partial class QueryStringValuesTransfer : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string id1 = Server.UrlDecode(Request.QueryString["id"]);
string name1 = Server.UrlDecode(Request.QueryString["name"]);
Response.Write(id1 + name1);
}
Example 2: string.QueryString c#
StringValues twoValues = StringValues.Concat(queryString["param2"], "my other value");
parsedQueryString["coronavirus"] = twoValues;
var param2Value = queryString["param2"];
param2Value.ToString();
param2Value.ToArray();
queryString["param1"] = "another value";
QueryString.Create(parsedQueryString).ToString();