protected void btnorder_Click(object sender, EventArgs e) { i = obj.AddOrderNo(txtname.Text, txtorderdesc.Text, Convert.ToInt32(ddntable.SelectedValue), Convert.ToInt32(ddnstaff.SelectedValue), Convert.ToDecimal(txtamount.Text), "User", DateTime.Now.ToString()); if (i > 0) { dt5 = obj.SelectOrder(); gvdetails.DataSource = dt5; gvdetails.DataBind(); Session["OrderNo"] = txtname.Text; Session["OrderDesc"] = txtorderdesc.Text; Session["TableNo"] = ddntable.SelectedItem.Text; Session["Staff"] = ddnstaff.SelectedItem.Text; Session["Amount"] = txtamount.Text; Response.Redirect("PrintOrder.aspx"); } }