UpdatePanel Conundrum

Last post 12-19-2006 3:30 PM by sbrauen. 1 replies.

Sort Posts:

  • UpdatePanel Conundrum

    12-13-2006, 5:09 PM
    • Member
      54 point Member
    • sbrauen
    • Member since 12-13-2006, 4:42 PM
    • San Antonio, TX
    • Posts 43

    I've got one of those lovely conundrum's where one implementation of an UpdatePanel works in one page and not in another.  Here's the setup:

    I'm using the Atlas Control Toolkit version 1.0.60731.0. I would updgrade to Beta2, but I'm using this in conjunction with an existing application and don't want to rewrite portions of the application that no longer work correctly.

    I have written the following code segment, which works correctly inside of a "clean" test file.  This segment contains an Infragistics NetAdvantage DateChooser control embedded within a Microsoft Atlas UpdatePanel. 

    (Before anyone complains, it's the Microsoft panel giving me the problem, not Infragistics for once, which is why I'm posting here.) 

    The segment is located within an ASCX file, called by ASPX file, which uses a Master file.  This wouldn't be my ideal split up, but it's how the original file was written so I tried to copy the structure the best I could.  The ScriptManager control is located in the Master file and the UpdatePanel in the ASCX file.  The ASPX page is just sitting there looking pretty.

    The ScriptManager control is written as such: <atlas:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="True">

    <atlas:UpdatePanel ID="upnlBudget2" runat="server" Mode="Always" RenderMode="Inline">
     
    <ContentTemplate>
       
    <asp:Label ID="Label2" runat="server" Font-Bold="True" ForeColor="Red" Text="Label" Visible="False" /><br />
       
    <igsch:WebDateChooser ID="WebDateChooser2" runat="server" OnValueChanged="WebDateChooser2_ValueChanged">
         
    <AutoPostBack ValueChanged="True" />
       
    </igsch:WebDateChooser>
     
    </ContentTemplate>
    </atlas:UpdatePanel>

    The Update is triggered when teh DateChooser control has it's value changed.  And on the backend is executing this simple function.

    protected
    void WebDateChooser2_ValueChanged(object sender, Infragistics.WebUI.WebSchedule.WebDateChooser.WebDateChooserEventArgs e)
    { Label2.Text = ((
    WebDateChooser)sender).Value.ToString();
      Label2.Visible =
    true;
    }

    Now, as I stated above, everything here works correctly in my test file.  However, when I try to add the exact code into the original file I want to modify the UpdatePanel fails and I end up doing full post backs everytime I change the value of the DateChooser.  The kicker in all of this is that the original file already contains two other UpdatePanel's that do not replicate this issue.  The other two controls will both perform their partial posts with no problem.

    Generally, in my experience, when two pages use the exact same code they'll either both work or they won't.  I know I've got to be missing something, because one does work and the other doesn't; and knowing my luck it's going to be something really obvious and stupid.

    That said, any help, advice, or insight that could be thrown my way would be most appreciated.

    Thanks.

  • Re: UpdatePanel Conundrum

    12-19-2006, 3:30 PM
    Answer
    • Member
      54 point Member
    • sbrauen
    • Member since 12-13-2006, 4:42 PM
    • San Antonio, TX
    • Posts 43
    As a follow up to this I figured out, a less than elegant, solution to the problem I was having.  I was able to get the Infragistics control to execute a client side JScript function and from that function I was able to execute the __doPostBack for the control.  As strange as it may seem, this actually got the UpdatePanel to kick off correctly and I could do the work I wanted to with out having to submit the entire page.
Page 1 of 1 (2 items)