Well, I think it's me - since I don't know much about Ajax and ASP.NET!
Basically, I have a calander control, and its in an update panel. When a date is chosen, it brings a modal dialog:
www.sandlerltd.co.uk
ok thats cool.
Now, on the server postback on the selectionchange of the calander control, I set a literal text in that modal dialog and guess what? shows no text!
I want to show the value of the selection in this literal control but when I set this programmatically (async trigger on the calander selection change event), it doesnt show any text at all.
any ideas? Where am I going wrong?
Code:<asp:Panel ID="MainDialogPanel" runat="server" Style="display: none" CssClass="modalPopup"> <div> <font color="white"> <asp:Literal runat="server" ID="litSelectedDate"></asp:Literal> </font> <p style="text-align: center;"> <asp:UpdatePanel runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:Button ID="OKButton" runat="server" Text="OK" /> <asp:Button ID="CancelButton" runat="server" Text="Cancel" OnClick="btnCancel_Click" /> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="OKButton" EventName="Click" /> <asp:AsyncPostBackTrigger ControlID="CancelButton" EventName="Click" /> </Triggers> </asp:UpdatePanel> </div> </asp:Panel> <input type="hidden" runat="server" id="hiddenControl" /> <cc1:ModalPopupExtender id="blogEntrySelectorPopup" runat="server" TargetControlID="hiddenControl" PopupControlID="MainDialogPanel" BackgroundCssClass="modalBackground" DropShadow="true" /> <asp:UpdatePanel runat="server" ID="updatePanelCalander" UpdateMode="Conditional"> <Triggers> <asp:AsyncPostBackTrigger EventName="SelectionChanged" ControlID="ASPCalanderControl"/> </Triggers> <ContentTemplate> <p align="center"> <asp:Calendar runat="server" ID="ASPCalanderControl" DayNameFormat="Shortest" Width="200px" onselectionchanged="ASPCalanderControl_SelectionChanged"> <SelectorStyle BackColor="#99CCCC" ForeColor="#336666" /> <WeekendDayStyle BackColor="#CCCCFF" /> <TodayDayStyle BackColor="#99CCCC" ForeColor="White" /> <OtherMonthDayStyle ForeColor="#999999" /> <NextPrevStyle Font-Size="8pt" ForeColor="#CCCCFF" /> <DayHeaderStyle BackColor="#99CCCC" ForeColor="#336666" Height="1px" /> <TitleStyle BackColor="#003399" ForeColor="#CCCCFF" BorderColor="#3366CC" BorderWidth="1px" Font-Bold="True" Font-Size="10pt" Height="25px" /> <SelectedDayStyle BackColor="#009999" Font-Bold="true" ForeColor="#CCFF99" /> </asp:Calendar> </p> </ContentTemplate> </asp:UpdatePanel>
code behind is simple:
Code:protected void ASPCalanderControl_SelectionChanged(object sender, EventArgs e) { // get the chosen date. // string dateChosen = this.ASPCalanderControl.SelectedDate.ToString("dd/MM/yyyy"); this.litSelectedDate.Text = "The list below shows the entries that were created and logged on the " + this.ASPCalanderControl.SelectedDate.ToString("dd/MM/yyyy"); this.DoObtainBlogs(this.ASPCalanderControl.SelectedDate); this.blogEntrySelectorPopup.Show(); //query }



any chance of a regain? 
Reply With Quote