G
Guest
I keep getting the following error with the code below:
Exception Details: System.NullReferenceException: Object reference not set
to an instance of an object.
Caused by this line:
this.basicSearch.OnSomethingHappened += new
System.EventHandler(this.ShowResult);
Here is some of my code:
CODE
private void ShowResult(object sender, System.EventArgs e)
{
this.results.searchData = ((BasicSearch)sender).searchData;
PlaceHolder1.Controls.Clear();
resultsCtrl = LoadControl("results.asxc");
PlaceHolder1.Controls.Add(resultsCtrl);
Response.Write("NOT HAPPENING");
}
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
this.basicSearch.OnSomethingHappened += new
System.EventHandler(this.ShowResult);
}
OnSomethingHappenened is an event declared in my BasicSearch usercontrol page.
Any ideas whats wrong?
Regards,
Wallace
Exception Details: System.NullReferenceException: Object reference not set
to an instance of an object.
Caused by this line:
this.basicSearch.OnSomethingHappened += new
System.EventHandler(this.ShowResult);
Here is some of my code:
CODE
private void ShowResult(object sender, System.EventArgs e)
{
this.results.searchData = ((BasicSearch)sender).searchData;
PlaceHolder1.Controls.Clear();
resultsCtrl = LoadControl("results.asxc");
PlaceHolder1.Controls.Add(resultsCtrl);
Response.Write("NOT HAPPENING");
}
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
this.basicSearch.OnSomethingHappened += new
System.EventHandler(this.ShowResult);
}
OnSomethingHappenened is an event declared in my BasicSearch usercontrol page.
Any ideas whats wrong?
Regards,
Wallace