Passing the value of a XML tag to another page
<p>Here is the page where I am retrieving from a XML page and by storing it in cookie, I want to retrieve it in another page.</p>

<pre><code>public partial class shopping : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        HttpCookie userCookie = new HttpCookie("user");
        userCookie["quantity"] = TextBox1.Text;

        XmlDocument doc = new XmlDocument();
        doc.Load(Server.MapPath("shopping_cart.xml"));
        XmlNode root = doc.DocumentElement;

        if (RadioButton1.Checked)
        {
            string str1 = doc.GetElementsByTagName("cost").Item(0).InnerText;
            userCookie["cost"] = str1;
            //Label3.Text = str1;
            Response.Redirect("total.aspx");
        }

    }
}
</code></pre>

<p>and here is other page where I am trying to retrieve it (total.aspx.cs):</p>

<pre><code>public partial class total : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        **Label2.Text = Request.Cookies["user"]["quantity"];**

    }
}
</code></pre>

<p>I am getting a Null Reference on the line which is in bold. Any suggestions on how can I do it?</p>
