Why is Calendar rendering when behind an UpdatePanel?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yarbrough40
    Contributor
    • Jun 2009
    • 320

    Why is Calendar rendering when behind an UpdatePanel?

    Gang, I have 2 calendar controls. Both within their own update panels. Why is it that both DayRender events (for both calendars) fire when an event is triggered from within either panel? - I would like for the dayrender event for ONLY the one calendar to be fired - not both.

    What am I doing wrong here?

    here is the simple layout
    Code:
     <table>
     <tr><td>
         <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>
    
        </ContentTemplate>
        </asp:UpdatePanel>
     </td></tr>
     
     <tr><td>
         <asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <ContentTemplate>
            <asp:Calendar ID="Calendar2" runat="server"></asp:Calendar>
        
        </ContentTemplate>
        </asp:UpdatePanel>
     </td></tr>
     
     </table>
    try for yourself... click any event within Calendar1 and DayRenderCalend ar1() AND DayRenderCalend ar2() will both fire... (and vice-versa) hmmmm
  • yarbrough40
    Contributor
    • Jun 2009
    • 320

    #2
    found my answer....
    UpdateMode="Con ditional"

    Code:
    <asp:UpdatePanel ID="update1" runat="server" UpdateMode="Conditional">

    Comment

    Working...