我必须这样做的原因是因为在另一个页面上,它必须继承dll类的名称。我如何能够在另一个aspx窗体中打开aspx窗体?
E.g. beePlugInIntegration.index
使dll代码工作。
但是,我不能简单地改变主页面继承类,因为整个系统会崩溃。
最后,我在想的是打开主页面中的子页面,所以我能够继承这两个类并使其工作。但是我所做的是使用
BeePlugInSection.Controls.Add(LoadControl("~/index.aspx"))
但是它返回我这个
Server Error in '/WebLITE' Application.
Type 'ASP.index_aspx' does not inherit from `System.Web.UI.UserControl`.
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.Web.HttpException: Type 'ASP.index_aspx' does not inherit from 'System.Web.UI.UserControl'.
Source Error:
有人可以帮助我在ASPX打开另一个表单类?
只需创建一个自定义控件并将其加载到index.aspx和其他任何需要它的地方。 – Filburt