Object Reference not set to Instance of an object Exception
// Checkout.aspx Order o = new Order(); o.CustomerID = User.Identity.Name; Session["CustomerID"] = o.CustomerID; o.OrderDate = DateTime.Now; o.FirstName = firstnametxt.Text; Session["FirstName"] = o.FirstName; o.LastName = lastnametxt.Text; Session["LastName"] = o.LastName; o.Company = companytxt.Text; Session["Company"] = o.Company; o.Address = addresstxt.Text; Session["Address"] = o.Address; o.Country = dpcountry.Text; Session["Country"] = o.Country; o.City = citytxt.Text; Session["City"] = o.City; o.Province = provincetxt.Text; Session["Province"] = o.Province; o.ZipCode = zipcodetxt.Text; Session["ZipCode"] = o.ZipCode; o.Telephone = telephonetxt.Text; Session["Telephone"] = o.Telephone; o.Fax = faxtxt.Text; Session["Fax"] = o.Fax;
protected void Page_Load(object sender, EventArgs e) { lblfirstname.Text = Session["FirstName"].ToString(); lbllastname.Text = Session["LastName"].ToString(); lbladdress.Text = Session["Address"].ToString(); lblphoneno.Text = Session["Telephone"].ToString(); lblprovince.Text = Session["Province"].ToString(); lblcity.Text = Session["City"].ToString(); lblpostalcode.Text = Session["ZipCode"].ToString(); bind(); }
Page_Load ()
checkout.aspx
Conform.aspx
Page_Load()
.ToString()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)