using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

 

namespace StateManagement

{

    public partial class QueryStringExample : System.Web.UI.Page

    {

        protected void Page_Load(object sender, EventArgs e)

        {

 

        }

 

        protected void btnProcess_Click(object sender, EventArgs e)

        {

            // Append data using key-value pairs to the URL

            // After the Full URL, absolute path to a file, or relative path to a file and a Filename,

            // the ? symbol and key-value pair list must follow the filename.

            // Each key-value pair must be separated by the & symbol

            // Format: ?Key1=value1&Key2=value2&KeyN=valueN

            // Example: QueryStringExampleResults.aspx?school=SOMEVALUE&major=ANOTHERVALUE

            Response.Redirect("QueryStringExampleResults.aspx?school=" + txtSchoolName.Text + "&major=" + txtMajor.Text);

        }

    }

}