give runat="server" attribute to that hidden control.
now you can access it in code-behind page.
then you can set session by
quanity.Value = Session["yoursessionname"].ToString();
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him forever.