updatepanel inside a panel gives an error

Last post 07-25-2006 9:14 AM by Luis Abreu. 5 replies.

Sort Posts:

  • updatepanel inside a panel gives an error

    05-06-2006, 6:59 PM
    • Member
      190 point Member
    • creaturita
    • Member since 02-24-2004, 6:11 AM
    • Spain (Sevilla)
    • Posts 42

    It says: sys.application.findobject() is null or it is not an object. When i debug it the problem is in this line:

    Sys.Application.findObject(

    '_tbComentario')._onSubmit()

     

    This is the code:

    <asp:Panel ID="PanelLogado" runat="server" Visible="False" Width="100%">

    <table width="100%">

    <tr>

    <td>

    <asp:Label ID="Label1" runat="server" Text="Primero clasifique el lugar" CssClass="textonormal"></asp:Label></td>

    <td>

    <cc1:Rater ID="Rater1" runat="server" AutoPostback="True" ImageOffUrl="http://www.pablocastilla.com/bares/images/rater/StarOff.gif"

    ImageOnUrl="http://www.pablocastilla.com/bares/images/rater/StarOn.gif" ImageOverUrl="http://www.pablocastilla.com/bares/images/rater/StarOver.gif"

    OnClick="" OnValueChanged="Rater1_ValueChanged" ScriptUrl="http://www.pablocastilla.com/bares/scripts/CastleRater.js"

    BorderColor="#657DA6" CssClass=".estrellas"></cc1:Rater></td>

    </tr>

    <tr>

    <td colspan="2">

    <asp:Label ID="lbEscribaRevision" runat="server" Text="Segundo escriba su revisión en este cuadro:"

    CssClass="textonormal"></asp:Label>

    </td>

    </tr>

    <atlas:UpdatePanel ID="UpdatePanel1" runat="server">

    <Triggers>

    <atlas:ControlEventTrigger ControlID="BtInsertaComentario" EventName="Click" />

    </Triggers>

    <ContentTemplate>

    <tr>

    <td colspan="2">

    <cc2:TextBoxWatermarkExtender ID="tbaComentario" runat="server">

    <cc2:TextBoxWatermarkProperties TargetControlID="tbComentario" WatermarkText="Escriba aquí su comentario para este bar después de haberle otorgado de 1 a 5 estrellas." />

    </cc2:TextBoxWatermarkExtender>

    <asp:TextBox ID="tbComentario" runat="server" TextMode="MultiLine" Width="100%" MaxLength="2000"

    CssClass="textonormal"></asp:TextBox>

    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tbComentario"

    ErrorMessage="* Campo Requerido"></asp:RequiredFieldValidator></td>

    </tr>

    <tr>

    <td colspan="2">

    <asp:Button ID="BtInsertaComentario" runat="server" Text="Insertar comentario" OnClick="BtInsertaComentario_Click" />

    </td>

    </tr>

    </ContentTemplate>

    </atlas:UpdatePanel>

    </table>

    </asp:Panel>

     

    Any ideas?

    "The only pain is to feel nothing at all"
  • Re: updatepanel inside a panel gives an error

    05-09-2006, 6:42 AM
    • Member
      72 point Member
    • dirkb
    • Member since 01-06-2006, 11:35 AM
    • Germany
    • Posts 15

    I have the same problems... Do you have a solution for this?

    Regards,
    Dirk

  • Re: updatepanel inside a panel gives an error

    05-09-2006, 6:49 AM
    • Member
      190 point Member
    • creaturita
    • Member since 02-24-2004, 6:11 AM
    • Spain (Sevilla)
    • Posts 42
    Well, it is quite sad but i have removed the panels and play with the visible attribute of the controls.
    "The only pain is to feel nothing at all"
  • Re: updatepanel inside a panel gives an error

    05-09-2006, 6:26 PM
    • All-Star
      25,662 point All-Star
    • Luis Abreu
    • Member since 02-12-2005, 1:22 AM
    • Madeira [Portugal]
    • Posts 5,368

    hello. i wouldn't say it's sad...i've just build a small sample on another thread that has a panel inside another panel (in fact, it loads user controls dinamically and in the end you have an updatepanel inside another updatepanel... the post is about disposing a xml script element...

    i must say that i still don't see any excuse for putting a panel inside another panel though...

    --
    Regards,
    Luis Abreu
    email: labreu_at_gmail.com
    EN blog:http://msmvps.com/blogs/luisabreu
  • Re: updatepanel inside a panel gives an error

    07-25-2006, 7:48 AM
    • Member
      30 point Member
    • abyss
    • Member since 07-25-2006, 11:39 AM
    • Posts 6
    Luis Abreu:

    and in the end you have an updatepanel inside another updatepanel... the post is about disposing a xml script element...


    this issue exists even if update panel is not contained in another panel ...

    try this code:

    <atlas:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" />
    <atlas:UpdatePanel ID="panel1" Mode="Always" runat="server" >
    <ContentTemplate>
        <asp:Label runat="server"  ID="label" />                   
    </ContentTemplate>
    <Triggers>
        <atlas:ControlEventTrigger ControlID="button" EventName="Click" />
    </Triggers>
    </atlas:UpdatePanel>

    <asp:Button ID="button" runat="server" OnClick="ButtonOnclick" Text="First" /> 
            
    <atlas:UpdatePanel ID="panel2" Mode="Always" runat="server" Visible="false">
    <ContentTemplate>                       
        <asp:CheckBox runat="server" ID="checkBox1" Checked="true" Visible="true" />              
    </ContentTemplate>
    </atlas:UpdatePanel>     

            
    the problem is that even marked as invisible second update panel still exists in atlas panels list.....

  • Re: updatepanel inside a panel gives an error

    07-25-2006, 9:14 AM
    • All-Star
      25,662 point All-Star
    • Luis Abreu
    • Member since 02-12-2005, 1:22 AM
    • Madeira [Portugal]
    • Posts 5,368

    hello.

    yep, you're right...scriptmanager will allways insert the panel in xml script even though it's not inserted in the final HTML that is sent to the browser. currently, and in the previous example, the only thing you can do is use the display css style instead of toggling the visibility of the panel (yes, i know that this is not what you wanted to hear...)

    btw, can you please add this sample to garbin's unofficial list? it really is a bug in the way that scriptmanager generates the xml...

    --
    Regards,
    Luis Abreu
    email: labreu_at_gmail.com
    EN blog:http://msmvps.com/blogs/luisabreu
Page 1 of 1 (6 items)