Updatepanel och repeater
Hi,
Issue:
In my Default.aspx page I have a Usercontrol called ContentWritingsHolder.asxc, this control contains a repeater which displays articles/blogs. The repeater is embedded with an updatepanel "UpdatePanel1". In the ItemTemplate I add a new UserControl called ContentWritings.asxc and content is as below described.
Now the problem is the Labelxx does not get refreshed when ButtonAddComment_Click is called. Any ideas what I might have forgot?
Ok ni får gärna svara på svenska alltså
---- Code ---
Default.aspx:
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEven....
..
..
<uc3:ContentWritingsHolder ID="oContenWritingsHolder" runat="server" />
...
..
ContentWritingsHolder.asxc:
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
<ContentTemplate>
<asp:Repeater ID="Repeater1" runat="server" onitemdatabound="Repeater1_ItemDataBound1">
<ItemTemplate><uc1:ContentWritings id="m_oContentWritings" runat="server" /></ItemTemplate>
</asp:Repeater>
</ContentTemplate>
</asp:UpdatePanel>
ContentWritings.asxc:
<asp:Button ID="ButtonAddComment" runat="server" Text="Add comment" onclick="ButtonAddComment_Click" />
<asp:UpdatePanel ID="UpdatePanelXX" runat="server" UpdateMode="Always">
<ContentTemplate>
<asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" ></asp:TextBox><br />
<asp:Label ID="Labelxx" runat="server" Text="Label"></asp:Label>
<asp:Button ID="ButtonSaveComment" runat="server" Text="Save comment" onclick="ButtonSaveComment_Click" />
</ContentTemplate>
</asp:UpdatePanel>
protected void ButtonAddComment_Click(object sender, EventArgs e)
{
Labelxx.Text = "Updated Text"; // It does not refresh with the new text "Updated Text", but this event fires
}:D
"Turn On, Tune In, and Drop Out"