本文整理汇总了C#中DotNetNuke.Entities.Modules.ModuleController.ReadLargeTabModuleSetting方法的典型用法代码示例。如果您正苦于以下问题:C# ModuleController.ReadLargeTabModuleSetting方法的具体用法?C# ModuleController.ReadLargeTabModuleSetting怎么用?C# ModuleController.ReadLargeTabModuleSetting使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DotNetNuke.Entities.Modules.ModuleController
的用法示例。
在下文中一共展示了ModuleController.ReadLargeTabModuleSetting方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if(!Page.IsPostBack)
{
try
{
var moduleController = new ModuleController();
lblJumbotronTitle.Text = (TabModuleSettings[SettingNames.JumbotronTitle] ?? LocalizeString("JumbotronDefaultTitle")).ToString();
litJumbotronContent.Text = moduleController.ReadLargeTabModuleSetting(TabModuleSettings, TabModuleId, SettingNames.JumbotronContent) ?? string.Empty;
btnSubmitPhone.Text = (TabModuleSettings[SettingNames.SubmitPhoneButton] ?? LocalizeString("SubmitForm")).ToString();
SelectedCountries = (TabModuleSettings[SettingNames.SelectedCountries] ?? SettingNames.DefaultCountries).ToString();
//Set cookies if viral metadata is specified
if (!string.IsNullOrWhiteSpace(GetQueryStringParameter("referal")))
base.Referal = GetQueryStringParameter("referal");
if (!string.IsNullOrWhiteSpace(GetQueryStringParameter("viral")))
base.ViralToken = GetQueryStringParameter("viral");
}
catch (Exception exc) //Module failed to load
{
Exceptions.ProcessModuleLoadException(this, exc);
}
}
}
示例2: LoadSettings
/// -----------------------------------------------------------------------------
/// <summary>
/// LoadSettings loads the settings from the Database and displays them
/// </summary>
/// -----------------------------------------------------------------------------
public override void LoadSettings()
{
try
{
if (Page.IsPostBack == false)
{
var module = new ModuleController();
if (TabModuleSettings.Contains(SettingNames.JumbotronTitle))
txtJumbotronTitle.Text = TabModuleSettings[SettingNames.JumbotronTitle].ToString();
if (TabModuleSettings.Contains(SettingNames.SubmitPhoneButton))
txtCallToActionPhone.Text = TabModuleSettings[SettingNames.SubmitPhoneButton].ToString();
txtSelectedCountries.Text = (TabModuleSettings[SettingNames.SelectedCountries] ?? SettingNames.DefaultCountries).ToString();
txtServiceOnSubmit.Text = (TabModuleSettings[SettingNames.ServiceOnSubmit] ?? string.Empty).ToString();
htmlEditor.Text = module.ReadLargeTabModuleSetting(TabModuleSettings, TabModuleId, SettingNames.JumbotronContent);
}
}
catch (Exception exc) //Module failed to load
{
Exceptions.ProcessModuleLoadException(this, exc);
}
}