Hello Trent,The BusinessObject works fine in an .aspx page because the aspx page is inherited from ApplicationBasePage but the user control cant refer to the same business object because it is not inherited from the ApplicationBAsePage and I dont think if it can be inherited from applicationbasepage as well. following is a code snippet from Aspx page [which works fine] and from .ascx control [which throws a compilation error since it does not know where the business object is]
Code for .ASCX [ User Control]
Partial
Class ListControls_CompanyListInherits System.Web.UI.UserControl
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
GridView1.DataSource = oCompanyBO.GetAll("vik")
DataBind()
End Sub
End Class
Code for ASPX page inherited from ApplicationBase Page.
Partial
Class List_CompanyInherits MyAppBasePage
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
GridView1.DataSource = oCompanyBO.GetAll("vik")
DataBind()
End Sub
End
Class