p>Please suggest how we can do this?推荐答案在这里,我向您展示如何使用DNN模块创建动态页面。有关更多信息,请参见此链接。Here I show you how to create dynamic pages using DNN module. For more information refer this link. 首先在Visual Studio中打开DNN网站。您可以在根目录中看到 DesktopModules 文件夹,右键单击该目录并添加新目录,将其命名为模块名称,例如 CountryState。现在,右键单击 CountryState 文件夹,然后依次单击Add-> Add New Item->选择 Web用户控件,并将其命名为您的模块名称,例如 CountryState.ascx,它将在DesktopModules / CountryState文件夹中显示CountryState.ascx和CountryState.ascx.cs文件。 下一步将继承类 System.Web.UI.UserControl更新为 PortalModuleBase 。这是因为PortalModuleBase类定义了门户网站内所有桌面门户网站模块继承的自定义基类。 PortalModuleBase类定义门户网站框架用来正确显示门户网站模块的特定于门户网站的属性。 现在使用主机凭据登录到您的网站。 在DNN面板中,转到主机->扩展。 单击右上方的创建新模块按钮 创建新模块按钮打开一个带有创建模块表单 DropDownList的弹出窗口。从该下拉列表中选择 Control 。 它将显示您的表单,从中选择您的.ascx Web用户控件作为相应的文件夹路径,然后单击创建模块按钮。 最后在页面上拖放模块。 享受吧! ;)First of all open your DNN website in Visual Studio. You can see the DesktopModules folder in your root directory, right click on the directory and add new directory give it to name as your module name, for example "CountryState". Now right click on the CountryState folder and Add->Add New Item->Select Web User Control and give it to name as your module name like "CountryState.ascx", it will show you CountryState.ascx and CountryState.ascx.cs files in DesktopModules/CountryState folder.Next step to update inherit class "System.Web.UI.UserControl" to "PortalModuleBase". This is because of the PortalModuleBase class defines a custom base class inherited by all desktop portal modules within the Portal. The PortalModuleBase class defines portal specific properties that are used by the portal framework to correctly display portal module.Now logged-In in your website using your Host credential.In DNN panel, go-to Host->Extensions.Click on Create New Module button on right top corner of the Extensions Page.Create New Module button open a popup window with Create Module Form DropDownList. Select Control from that Drop-Down.It will show you form, select your .ascx web user control in that from as respected folder path and click on Create Module button.Finally Drag-N-Drop module on your page.Enjoy! ;) 这篇关于我如何在DNN中填充下拉式FOM数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-09 22:06