我想在模块中嵌入一个 C# 类,以便我可以使用按钮和单击事件调用函数。我不知道该怎么做。我已经设法编写了我想使用的类,但是我将代码放在哪里?我在 DNN 中创建了一个模块并得到了这个:
<%@ Control Language="C#" ClassName="MailingSystem" Inherits="DotNetNuke.Entities.Modules.PortalModuleBase" %>
<h1>Congratulations</h1>
<p>You have successfully created your module. You can edit the source of the module control by selecting the View Source Action from the Action Menu.</p>
<script runat="server">
</script>
我不能把我的代码放在这里,我得到各种关于不允许命名空间的错误,不能用“Using”导入类等等。那我该怎么办?我的课正在工作,我只需要将它包装在一个模块中并将其放在 DNN 页面上。