Wednesday, March 21, 2012

60731 error

I heve the following code

<asp:TextBox ID="txtde_la" runat="server" CssClass="TextBox"
Font-Bold="True" Font-Size="XX-Small" Width="30%" OnInit="txtde_la_Init"></asp:TextBox>
<asp:RegularExpressionValidator ID="validde_la" runat="server" ErrorMessage="*"
Font-Bold="True" ControlToValidate="txtde_la"></asp:RegularExpressionValidator>
<asp:Panel ID="Panel1" runat="server">
<atlas:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<atlasToolkit:PopupControlExtender ID="PopupControlExtender1" runat="server">
<atlasToolkit:PopupControlProperties PopupControlID="Panel1" Position="Bottom" TargetControlID="txtde_la" ID="foo" />
</atlasToolkit:PopupControlExtender>
<center>
<asp:Calendar ID="Calendar3" runat="server" BackColor="White" BorderColor="#999999"
CellPadding="1" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt"
ForeColor="Black" OnSelectionChanged="Calendar3_SelectionChanged" Width="160px">
<SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
<TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
<SelectorStyle BackColor="#CCCCCC" />
<WeekendDayStyle BackColor="#FFFFCC" />
<OtherMonthDayStyle ForeColor="Gray" />
<NextPrevStyle VerticalAlign="Bottom" />
<DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
<TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
</asp:Calendar>
</center>
</ContentTemplate>
</atlas:UpdatePanel>
</asp:Panel>

protected void txtde_la_Init(object sender, EventArgs e)
{
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("ro-RO", false);
DateTime dt = new DateTime();
dt = DateTime.Today;
txtde_la.Text = txtpana_la.Text = dt.ToShortDateString() + " " + System.DateTime.Now.ToShortTimeString();
}

After upgrading to 60731 on Panel at design time I get the following error: The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.

And another problem with an TextBoxWatermarkExtender on the same page.

After selecting a date on that Calendar the watermark text dissapears.

Sorin

Shawn outlines the Atlas change that introduced locking and the workaround for the resulting problem here:http://forums.asp.net/thread/1358703.aspx.

No comments:

Post a Comment