抛出错误的代码发生在:
protected void btnAddSales_click(object sender,EventArgs e) {string orderName = Ordername.Text;}
错误:
Error message: Object reference not set to an instance of an object.
at POL.Website.inventory.AddSales_click(Object sender, EventArgs e) in \\Website\inventory.aspx.cs:line 321
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
出现此错误的可能原因是什么?