-1
我正在開發一個dnn模塊。我使用C#代碼隱藏。但是,當我添加模塊時,DNN顯示錯誤。其他頁面工作正常,但我添加該模塊的頁面表示DotNetNuke錯誤。該錯誤沒有任何代碼,只顯示我的標誌。即使管理條消失。 我做錯了什麼?添加模塊時出現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....
}
您試圖添加哪個模塊?沒有更多的信息,我不認爲任何人都可以幫助你。 –
任何模塊。我創建了一個模塊,添加後它變空了。 –