添加模块时出现DotNetNuke错误



我正在开发一个dnn模块。我用的是C#代码。但是当我添加模块时,DNN显示错误。其他页面工作正常,但我添加模块的页面显示DotNetNuke错误。这个错误没有任何代码,它只显示我的徽标。甚至连管理条也消失了。我做错了什么?

using System;
using DotNetNuke.Services.Exceptions;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Entities.Modules.Actions;
using DotNetNuke.Services.Localization;
using DotNetNuke.Security;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
using System.Web.UI;
using System.Configuration;
//imports
namespace DotNetNuke.Modules.Catagory
{
    public partial class View : CatagoryModuleBase, IActionable
    {
        public bool inEdit = false;
        private bool IsValid = true;
        #region Event Handlers
        override protected void OnInit(EventArgs e)
        {
            InitializeComponent();
            base.OnInit(e);
        }
        private void InitializeComponent()
        {
            this.Load += new System.EventHandler(this.Page_Load);
        }
        private void Page_Load(object sender, System.EventArgs e)
        {
            try
            {
                if (IsPostBack)
                {
                    if (Catagory_Table.SelectedRow != null)
                    { //There is a selected item, hence edit mode Catagory_Table.SelectedIndex >= 0
                        this.inEdit = true;
                        to_edit_mode(); 
                    }
                    else
                    {
                        to_add_mode();
                    }
                }
                else
                {
                    to_add_mode();
                }
            }
            catch (Exception exc) //Module failed to load
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }
        protected void Button1_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            SqlDataSource1.Insert();
        }
        //the rest if the methods to handle the buttton events....
}

您需要尝试检查Admin/Event Viewer以查看错误的具体内容,然后才能更好地了解需要修复的内容。

最新更新