Hi,
I'm trying to fill a datagrid from a database depending on what the user has selected on the form.
I have two recurring errors:
1st: Property access must assign to the property or use its value the line of coding highlighted is AdvancedSolutions1.DataSource() where AdvancedSolutions1 is the datagrid ID.
2nd: I have tried setting the AdvancedSolutions1.DataSource() to the objDataReader but I get the following error
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
With the stack trace as:
[NullReferenceException: Object reference not set to an instance of an object.]
CrypticCrosswordSolver.NewAdvancedSearch1.btnSubmit_Click(Object sender, EventArgs e) in c:\inetpub\ System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()
Can anybody help me with either of these errors? If any more coding is needed please let me know and I'll put it up.
Thanks in anticipation
Jane
I'm trying to fill a datagrid from a database depending on what the user has selected on the form.
I have two recurring errors:
1st: Property access must assign to the property or use its value the line of coding highlighted is AdvancedSolutions1.DataSource() where AdvancedSolutions1 is the datagrid ID.
2nd: I have tried setting the AdvancedSolutions1.DataSource() to the objDataReader but I get the following error
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
With the stack trace as:
[NullReferenceException: Object reference not set to an instance of an object.]
CrypticCrosswordSolver.NewAdvancedSearch1.btnSubmit_Click(Object sender, EventArgs e) in c:\inetpub\ System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()
Can anybody help me with either of these errors? If any more coding is needed please let me know and I'll put it up.
Thanks in anticipation
Jane