I had a 1.0 page with two messageboards on one page (different topics and access levels).
When I run this page now, I'm getting an error about startDate not being unique. I don't access startDate in the code so this seems to be coming from the controls conflicting.
Multiple controls with the same ID 'dateStart' were found. FindControl requires that controls have unique IDs.
Stack Trace:
[HttpException (0x80004005): Multiple controls with the same ID 'dateStart' were found. FindControl requires that controls have unique IDs.]
System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +220
System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +280
System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +280
System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +280
System.Web.UI.Control.EnsureNamedControlsTable() +57
System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +106
System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +64
System.Web.UI.Control.FindControl(String id) +9
|
My code (condensed):
<td style="height: 25px" width="760"><RMB:RichMessageBoard ID="RichMessageBoard1" runat="server" UserIsAdmin="True" TopicID="1" TopicSubject="Admin" /></td>
<td style="height: 25px" width="760"><RMB:RichMessageBoard ID="RichMessageBoard2" runat="server" UserIsAdmin="True" TopicID="2" TopicSubject="user comments" /></td>Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not (Session("Authenticated")) ThenResponse.Redirect("login.aspx")
End If
RichMessageBoard1.AllowAnonymousPosts =
False
RichMessageBoard1.UserIsAdmin =
False
RichMessageBoard2.AllowAnonymousPosts =
False
RichMessageBoard2.UserIsAdmin =
False
RichMessageBoard2.Username = User.Identity.Name()
RichMessageBoard1.Theme = RichMessageBoardNS.RichMessageBoardThemeEnum.Custom
RichMessageBoard1.ClassName =
"Orange2"
RichMessageBoard2.Theme = RichMessageBoardNS.RichMessageBoardThemeEnum.Custom
RichMessageBoard2.ClassName =
"Orange2"
End SubDave Hunt