asp.net - User controls with update panel on each one do not update correctly -
i have 2 user controls on aspx page. both of them has update panel , updatemode property set conditional:
first 1 (votecontrol):
<asp:updatepanel id="voteupdatepanel" runat="server" updatemode="conditional"> <contenttemplate> <div class="vote"> <div class="counter"> <asp:label id="lblvotecount" runat="server" /> </div> <div class="vote-up"> <asp:imagebutton id="btnvote" runat="server" imageurl="~/app_themes/defaulttheme/images/br_up.png" onclick="btnvote_click" /> </div> </div> </contenttemplate> <triggers> <asp:asyncpostbacktrigger controlid="btnvote" eventname="click" /> </triggers> </asp:updatepanel>
and other 1 (commentcontrol) updatepanelanimationextender
:
<asp:updatepanel id="commentupdatepanel" runat="server" updatemode="conditional"> <contenttemplate> <asp:gridview id="gvcomments" runat="server" autogeneratecolumns="false" showfooter="false" showheader="false" gridlines="none" skinid="simplegrid-noformat"> <columns> <asp:templatefield> <itemtemplate> <div class="contents"> <table style="width: 100%"> <tr> <td> <%# "<b>" + eval("addedbyname") + "</b>" %> <%# eval("commentbody") %> </td> <td style="vertical-align: top; text-align: left; width: 70px; padding-right: 10px"> <div class="gravatar"> <ajaxtoolkit:gravatar id="gravatar1" runat="server" width="64px" height="64px" email='<%# eval("addedbyemail") %>' /> </div> </td> </tr> </table> </div> </itemtemplate> </asp:templatefield> </columns> </asp:gridview> <asp:panel id="addcommentpanel" runat="server"> <div class="add-comment"> <div id="maincomment"> <asp:panel id="commentpanel" runat="server" clientidmode="static"> <div class="comment-title"> <h2>comments</h2> </div> <div> <asp:textbox id="txtcommentbody" runat="server" skinid="formatedtextboxrtl" width="99%" textmode="multiline" height="100px" /> <div class="add"> <asp:button id="btnsavecomment" runat="server" text="submit" skinid="simplebutton" validationgroup="comment" onclick="btnsavecomment_click" /> <asp:hyperlink id="hyperlink1" runat="server" text="discard" /> </div> </div> </asp:panel> </div> <div id="tanks"> <asp:panel id="messagepanel" runat="server" visible="false"> <div> </div> </asp:panel> </div> </div> </asp:panel> </contenttemplate> <triggers> <asp:asyncpostbacktrigger controlid="btnsavecomment" eventname="click" /> </triggers> </asp:updatepanel> <ajaxtoolkit:updatepanelanimationextender id="upae" runat="server" behaviorid="animation" targetcontrolid="commentupdatepanel" alwaysfinishonupdatinganimation="true"> <animations> <onupdating> <sequence> <parallel duration="0"> <enableaction animationtarget="btnsavecomment" enabled="false" /> </parallel> <parallel duration=".25" fps="30"> <fadeout animationtarget="comments" minimumopacity=".2" /> </parallel> </sequence> </onupdating> <onupdated> <sequence> <parallel duration=".25" fps="30"> <fadein animationtarget="comments" minimumopacity="1" /> </parallel> <parallel duration="0"> <enableaction animationtarget="comments" enabled="true" /> </parallel> </sequence> </onupdated> </animations> </ajaxtoolkit:updatepanelanimationextender>
so, commentcontrol
works fine, when click btnvote
on votecontrol
, commentcontrol
starts updating , stay in update mode! code have been fired , when refresh aspx page, every things (database takes effects).
not know miss or fault. please me in this?
Comments
Post a Comment