SwizzleSkids
10-25-2004, 07:24 PM
So like Rob Welsh in the previous thread I am trying to place an image in the header in place of the current text. I followed the instructions from the "panels without recompiling" KB article:
http://www.interspire.com/support/articlelive/index.php?ToDo=view&questId=10&catId=1
This worked for the work I was doing on the footer panel - but when I created a new header panel I keep getting this error message:
External component has thrown an exception.
I know it's probably just something that I didn't delete out of the new PageHeader panel. Using the Default-Stretched template - here is the new PageHeader2 panel:
<%@ Control Language="c#" AutoEventWireup="true" Inherits="Interspire.ArticleLive.Web.BaseUserControl" %>
<%@ Import namespace="Interspire.ArticleLive.Web" %>
<script language="C#" runat="server">
public abstract class PageHeader : BaseUserControl
{
private PageSet currentPages;
{
get { return currentPages; }
set { currentPages = value; }
}
private void Page_Load(object sender, System.EventArgs e)
{
this.EnableViewState = false;
if (!IsPostBack)
{
CurrentPages = (new PageEngine(Config.Current)).GetLivePages(false);
DataBind();
}
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
</script>
<TABLE id="Table1" cellSpacing="0" cellPadding="0" width="100%" border="0" class="PageHeader">
<TR>
<TD><table width="100%" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td class="Main"><a href='<%= Config.Current.HomePagePath %>'><%= Config.Current.WebSiteName %></a></td>
<td class="Menu">
<A href="<%= Config.Current.HomePagePath %>"><%= ResourceHelper.GetString("Home") %></A> | <asp:Repeater Runat=server DataSource='<%# CurrentPages %>' id=Repeater1><ItemTemplate><a href='<%# LinkHelper.CreatePageLink((Interspire.ArticleLive. Page)Container.DataItem) %>'><%# DataBinder.Eval(Container.DataItem, "Title") %></a> | </ItemTemplate></asp:Repeater> <A href="<%= Config.Current.SiteMapPagePath %>">
<%= ResourceHelper.GetString("SiteMap") %></A> | <A href="<%= Config.Current.SyndicatePagePath %>"><%= ResourceHelper.GetString("Syndicate") %></A>
</td>
</tr>
</table>
</TD>
</TR>
<TR>
<TD class="Bar"></TD>
</TR>
</TABLE>
Basically I took out the two lines that had "protected" at the front:
protected System.Web.UI.WebControls.Repeater Repeater1;
and
protected PageSet CurrentPages
Does anyone know what I'm doing wrong?
This leads me to another question - editing the panels this way (recompiling on the fly) I'm told will:
This approach will slightly lower the performance of your code but unless you have a very heavy load on your server it shouldn't make a significant difference.
What exactly does this mean? Will the website run slower? And how much is "a heavy load?"
http://www.interspire.com/support/articlelive/index.php?ToDo=view&questId=10&catId=1
This worked for the work I was doing on the footer panel - but when I created a new header panel I keep getting this error message:
External component has thrown an exception.
I know it's probably just something that I didn't delete out of the new PageHeader panel. Using the Default-Stretched template - here is the new PageHeader2 panel:
<%@ Control Language="c#" AutoEventWireup="true" Inherits="Interspire.ArticleLive.Web.BaseUserControl" %>
<%@ Import namespace="Interspire.ArticleLive.Web" %>
<script language="C#" runat="server">
public abstract class PageHeader : BaseUserControl
{
private PageSet currentPages;
{
get { return currentPages; }
set { currentPages = value; }
}
private void Page_Load(object sender, System.EventArgs e)
{
this.EnableViewState = false;
if (!IsPostBack)
{
CurrentPages = (new PageEngine(Config.Current)).GetLivePages(false);
DataBind();
}
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
</script>
<TABLE id="Table1" cellSpacing="0" cellPadding="0" width="100%" border="0" class="PageHeader">
<TR>
<TD><table width="100%" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td class="Main"><a href='<%= Config.Current.HomePagePath %>'><%= Config.Current.WebSiteName %></a></td>
<td class="Menu">
<A href="<%= Config.Current.HomePagePath %>"><%= ResourceHelper.GetString("Home") %></A> | <asp:Repeater Runat=server DataSource='<%# CurrentPages %>' id=Repeater1><ItemTemplate><a href='<%# LinkHelper.CreatePageLink((Interspire.ArticleLive. Page)Container.DataItem) %>'><%# DataBinder.Eval(Container.DataItem, "Title") %></a> | </ItemTemplate></asp:Repeater> <A href="<%= Config.Current.SiteMapPagePath %>">
<%= ResourceHelper.GetString("SiteMap") %></A> | <A href="<%= Config.Current.SyndicatePagePath %>"><%= ResourceHelper.GetString("Syndicate") %></A>
</td>
</tr>
</table>
</TD>
</TR>
<TR>
<TD class="Bar"></TD>
</TR>
</TABLE>
Basically I took out the two lines that had "protected" at the front:
protected System.Web.UI.WebControls.Repeater Repeater1;
and
protected PageSet CurrentPages
Does anyone know what I'm doing wrong?
This leads me to another question - editing the panels this way (recompiling on the fly) I'm told will:
This approach will slightly lower the performance of your code but unless you have a very heavy load on your server it shouldn't make a significant difference.
What exactly does this mean? Will the website run slower? And how much is "a heavy load?"