I was playing around with web user controls and had created two controls, a search.ascx containing a text field control and a button as well as a results.ascx containing a datagrid.
The search.ascx used the submitted text to query a database and return a dataset passing the dataset to the result.ascx via a public property. All worked fine except being able to bind the datagrid to the dataset in the result.ascx control. When it came to binding I would get the 'object not set to an instance.' error.
Can anyone explain how I would bind the datagrid in the scenario, both search.ascx and result.ascx where on the same aspx page and decaled correctly and for all intense and purposes everything else was work except when it came to setting the datagrids source to the dataset?
Thanks in advance.