ok - I really appreciate you sticking with me on this but I seem to still be missing something.
I moved the update panel inside the InnerBodyPanel and made sure I am inheriting from SiteModuleControl as it was already. Rebuilt everything and it runs fine just no setting links. It renders the title with the text "YOUR TITLE" and I can not find out where it is getting that from.
Is there an CODE BEHIND example on the site somewhere so I can see if that will run?
-----------------------------------------------------------------------------
My code behind as follows:
---------------------------------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Configuration;
using System.Globalization;
using System.Text;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using mojoPortal.Web;
using mojoPortal.Web.Framework;
using mojoPortal.Web.UI;
using Resources;
namespace digital.Web.UI.FormSettings
{
public partial class FormWithSettings : SiteModuleControl
{
private string setting1 = string.Empty;
private string setting2 = string.Empty;
protected void Page_Load(object sender, EventArgs e)
{
LoadSettings();
PopulateLabels();
if (!Page.IsPostBack)
{
PopulateControls();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
TextBox1.Text = "Hello Web I'm a plain old UserControl ";
}
protected void chkAutoPostBackTest_CheckedChanged(object sender, EventArgs e)
{
lblCheckboxResult.Text = "You posted back.";
}
protected void ddColors_SelectedIndexChanged(object sender, EventArgs e)
{
lblDropDownResult.Text = ddColors.SelectedValue;
}
private void PopulateControls()
{
TextBox1.Text = "Click the button";
}
private void PopulateLabels()
{
//if (setting1.Length > 0) { lblText1.Text = setting1; }
//if (setting2.Length > 0) { lblText2.Text = setting2; }
}
private void LoadSettings()
{
if (this.ModuleConfiguration != null)
{
this.Title = this.ModuleConfiguration.ModuleTitle;
this.Description = this.ModuleConfiguration.FeatureName;
}
if (Settings.Contains("setting1"))
{
setting1 = Settings["setting1"].ToString();
}
if (Settings.Contains("setting2"))
{
setting2 = Settings["setting2"].ToString();
}
}
}
}
--------------------------------------------------------------
my page as follows
------------------------------------------------------------------
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="FormWithSettings.ascx.cs" Inherits="digital.Web.UI.FormSettings.FormWithSettings" %>
<portal:OuterWrapperPanel ID="OuterWrapperPanel1" runat="server">
<mp:CornerRounderTop id="CornerRounderTop1" runat="server" />
<portal:InnerWrapperPanel ID="InnerWrapperPanel1" runat="server" CssClass="panelwrapper mymodule">
<ContentTemplate>
<portal:ModuleTitleControl id="ModuleTitleControl1" runat="server" />
<portal:OuterBodyPanel ID="OuterBodyPanel1" runat="server">
<portal:InnerBodyPanel ID="InnerBodyPanel1" runat="server" CssClass="modulecontent">
<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server">
<div class="settingrow">
<asp:CheckBox ID="chkAutoPostBackTest" runat="server" Text="Auto Postback" AutoPostBack="true"
OnCheckedChanged="chkAutoPostBackTest_CheckedChanged" />
<asp:Label ID="lblCheckboxResult" runat="server" />
</div>
<div class="settingrow">
AutoPostBack Dropdown
<asp:DropDownList ID="ddColors" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddColors_SelectedIndexChanged">
<asp:ListItem Text="Blue" Value="Blue"></asp:ListItem>
<asp:ListItem Text="Green" Value="Green"></asp:ListItem>
<asp:ListItem Text="Red" Value="Red"></asp:ListItem>
<asp:ListItem Text="Yellow" Value="Yellow"></asp:ListItem>
</asp:DropDownList>
<asp:Label ID="lblDropDownResult" runat="server" />
</div>
<div class="settingrow">
<asp:TextBox ID="TextBox1" runat="server" CssClass="widetextbox"></asp:TextBox>
<portal:mojoButton ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
</div>
</asp:UpdatePanel>
</portal:InnerBodyPanel>
</portal:OuterBodyPanel>
</ContentTemplate>
<portal:EmptyPanel id="EmptyPanel1" runat="server" CssClass="cleared" SkinID="cleared"></portal:EmptyPanel>
</portal:InnerWrapperPanel>
<mp:CornerRounderBottom id="CornerRounderBottom1" runat="server" />
</portal:OuterWrapperPanel>