ListController listcontr = new ListController(); ListEntryInfoCollection listentries = listcontr.GetListEntryInfoCollection("Country"); drpText1.DataSource = listentries; drpText1.DataValueField = "Value"; drpText1.DataTextField = "Text"; drpText1.DataBind();
//Event DotNetNuke.Services.Log.EventLog.EventLogController objEventLog = new DotNetNuke.Services.Log.EventLog.EventLogController(); DotNetNuke.Services.Log.EventLog.LogInfo objEventLogInfo = new DotNetNuke.Services.Log.EventLog.LogInfo(); objEventLog.AddLog("Sample Message", ReferrerURL, PortalSettings, -1, DotNetNuke.Services.Log.EventLog.EventLogController.EventLogType.ADMIN_ALERT);
|
|
10.DNN中向界面显示模块消息
Skin.AddModuleMessage(this , GetLocalizedString("Error.NoAlbums"), ModuleMessage.ModuleMessageType .BlueInfo);
11.如何在DNN后台产生用dnnModal.show脚本
DotNetNuke.Common.Utilities.UrlUtils名称空间下PopUpUrl系列方法,此处仅例句一个函数声明
public static string PopUpUrl( string url, Control control,PortalSettings portalSettings, bool onClickEvent, bool responseRedirect,int windowHeight, int windowWidth, bool refresh, string closingUrl);
12.如何在后台得到DNN中通用的图标库中的图标url
DNN提供了一份通用的后台图标库(如下图),其目录位置在【DNN Website】\Icons\Sigma目录下
要在后台得到这些icon请参考接下来的代码片段:
var urlFormat = (Request.IsSecureConnection) ? "https://" : "http://"; p_AddImage = string.Concat(urlFormat, PortalSettings.PortalAlias.HTTPAlias, IconController.IconURL("【Icon Key】", "16x16"));