R
riddion
Hello.
I am having problems with the repeater webform control. Inside the
<ItemTemplate> section I have a Calendar control. This is for so the
user can choose a different date on each of the items in the repeater.
I also have buttons in the <ItemTemplate> section.
The buttons' click event is catched by the repeater's ItemCommand event
and they are handled, but Calendar's SelectionChanged event is not
catched by the ItemCommand event. I have this code:
<asp:Repeater id="rptDate" runat="server">
<ItemTemplate>
<asp:Button id="btnChoose" runat="server"
Text="Choose"></asp:Button>
<asp:TextBox id="txtDate" runat="server" size="11"
MaxLength="10"></asp:TextBox>
<DIV align="right">
<asp:Calendar id="cal" runat="server"
Visible="False"></asp:Calendar>
</DIV>
</ItemTemplate>
</asp:Repeater>
The btnChoose button's OnClick event is catched the event handler,
"private void rptDate_ItemCommand(object source,
System.Web.UI.WebControls.RepeaterCommandEventArgs e)". I use this
button to make the calendar visible so that the user can choose a date.
I then want the chosen date to be displayed in the textbox. Am I doing
something wrong? Or maybe something I have forgotten?
Any help with be helpful.
Thanks
Erik Aleksander Moe
I am having problems with the repeater webform control. Inside the
<ItemTemplate> section I have a Calendar control. This is for so the
user can choose a different date on each of the items in the repeater.
I also have buttons in the <ItemTemplate> section.
The buttons' click event is catched by the repeater's ItemCommand event
and they are handled, but Calendar's SelectionChanged event is not
catched by the ItemCommand event. I have this code:
<asp:Repeater id="rptDate" runat="server">
<ItemTemplate>
<asp:Button id="btnChoose" runat="server"
Text="Choose"></asp:Button>
<asp:TextBox id="txtDate" runat="server" size="11"
MaxLength="10"></asp:TextBox>
<DIV align="right">
<asp:Calendar id="cal" runat="server"
Visible="False"></asp:Calendar>
</DIV>
</ItemTemplate>
</asp:Repeater>
The btnChoose button's OnClick event is catched the event handler,
"private void rptDate_ItemCommand(object source,
System.Web.UI.WebControls.RepeaterCommandEventArgs e)". I use this
button to make the calendar visible so that the user can choose a date.
I then want the chosen date to be displayed in the textbox. Am I doing
something wrong? Or maybe something I have forgotten?
Any help with be helpful.
Thanks
Erik Aleksander Moe