Hi hajbehnam,
Check this example. Now please take its reference and correct your code.
Default.aspx
<asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" />
Code
Default.aspx.cs
protected void btnSubmit_Click(object sender, EventArgs e)
{
Response.Redirect("QueryString.aspx?brand=brand,brand2,brand3,brand4%20&price=price,price2,price3,price4%20&Discount=Attribute,Attribute2,Attribute3,Attribute4");
}
Default.aspx.vb
Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As EventArgs)
Response.Redirect("QueryStringVB.aspx?brand=brand,brand2,brand3,brand4%20&price=price,price2,price3,price4%20&Discount=Attribute,Attribute2,Attribute3,Attribute4")
End Sub
QueryString.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
string brand = Request.QueryString["brand"].ToString();
string price = Request.QueryString["price"];
string[] brandArray = brand.Split(',');
string[] priceArray = price.Split(',');
}
QueryString.aspx.vb
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Dim brand As String = Request.QueryString("brand").ToString()
Dim price As String = Request.QueryString("price")
Dim brandArray As String() = brand.Split(","c)
Dim priceArray As String() = price.Split(","c)
End Sub
Screenshots