Hi guys,
I have a folowing problem: I have a page where I need to create a lot of elements dynamically from the code behind. It obviously depends on what is passed from the database, but the number of elements can change, that's why I cannot do it static.
What I have at the moment, is:
I have statically created PANEL:
<asp:Panel ID="pFullInfo_lStartDateStr" runat="server"></asp:Panel>
Then in Code Behind, I'm creating other Controls and add them to my Label. The Issue I have is that the CalendarExtender that should appear after clicking the iEditStartDateCalendar doesn't popup :( I can't see what I'm doing wrong here ? Any help please ?!?!
// StartDate
Label lStartDateSite = new Label();
pFullInfo_lStartDateStr.Controls.Add(lStartDateSite);
Label lStartDate = new Label();
pFullInfo_lStartDateStr.Controls.Add(lStartDate);
ImageButton ibEditStartDate = new ImageButton();
ibEditStartDate.ID = "ibEditStartDate_" + this_site_id;
pFullInfo_lStartDateStr.Controls.Add(ibEditStartDate);
TextBox tbEditStartDate = new TextBox();
pFullInfo_lStartDateStr.Controls.Add(tbEditStartDate);
Image iEditStartDateCalendar = new Image();
iEditStartDateCalendar.ID = "iEditStartDateCalendar";
iEditStartDateCalendar.ImageUrl = "~/i/small/calendar.png";
iEditStartDateCalendar.ImageAlign = ImageAlign.AbsMiddle;
pFullInfo_lStartDateStr.Controls.Add(iEditStartDateCalendar);
CalendarExtender ceEditStartDate = new CalendarExtender();
ceEditStartDate.ID = "ceEditStartDate_" + this_site_id;
ceEditStartDate.PopupButtonID = iEditStartDateCalendar.UniqueID;
ceEditStartDate.TargetControlID = tbEditStartDate.UniqueID;
ceEditStartDate.PopupPosition = CalendarPosition.Right;
pFullInfo_lStartDateStr.Controls.Add(ceEditStartDate);