在DNN的Module代码里加入ScriptManager,因为直接拖入ScriptManager是会有错误的
private void RegisterAjaxWebservice()
{
if (DotNetNuke.Framework.AJAX.IsInstalled())
{
DotNetNuke.Framework.AJAX.RegisterScriptManager();
ScriptManager scriptManager = ScriptManager.GetCurrent(Page);
}
}
然后加入Page_Load里面
private void Page_Load(object sender, System.EventArgs e)
{
try
{
RegisterAjaxWebservice();
}
catch (Exception exc) //Module failed to load
{
Exceptions.ProcessModuleLoadException(this, exc);
}
}