Problems with Repeater control

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,125
Latest member
VinayKumar Nevatia_
Top