I keep getting the following error with the code below:
Exception Details: System.NullRefe renceException: Object reference not set
to an instance of an object.
Caused by this line:
this.basicSearc h.OnSomethingHa ppened += new
System.EventHan dler(this.ShowR esult);
Here is some of my code:
CODE
private void ShowResult(obje ct sender, System.EventArg s e)
{
this.results.se archData = ((BasicSearch)s ender).searchDa ta;
PlaceHolder1.Co ntrols.Clear();
resultsCtrl = LoadControl("re sults.asxc");
PlaceHolder1.Co ntrols.Add(resu ltsCtrl);
Response.Write( "NOT HAPPENING");
}
private void InitializeCompo nent()
{
this.Load += new System.EventHan dler(this.Page_ Load);
this.basicSearc h.OnSomethingHa ppened += new
System.EventHan dler(this.ShowR esult);
}
OnSomethingHapp enened is an event declared in my BasicSearch usercontrol page.
Any ideas whats wrong?
Regards,
Wallace
Exception Details: System.NullRefe renceException: Object reference not set
to an instance of an object.
Caused by this line:
this.basicSearc h.OnSomethingHa ppened += new
System.EventHan dler(this.ShowR esult);
Here is some of my code:
CODE
private void ShowResult(obje ct sender, System.EventArg s e)
{
this.results.se archData = ((BasicSearch)s ender).searchDa ta;
PlaceHolder1.Co ntrols.Clear();
resultsCtrl = LoadControl("re sults.asxc");
PlaceHolder1.Co ntrols.Add(resu ltsCtrl);
Response.Write( "NOT HAPPENING");
}
private void InitializeCompo nent()
{
this.Load += new System.EventHan dler(this.Page_ Load);
this.basicSearc h.OnSomethingHa ppened += new
System.EventHan dler(this.ShowR esult);
}
OnSomethingHapp enened is an event declared in my BasicSearch usercontrol page.
Any ideas whats wrong?
Regards,
Wallace
Comment