Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I am facing problem with modalpopupextender cancelcontrolid. I have assigned a imagebutton to cancelcontrolid. The design code relating to repeater control is below.

This modalpopupextender is in repeater control. imagebutton is in panel that i am using as a popup.

When page loads for first time there is no problem with modalpopupextender's cancel button.Once if the page is postback,and i click on modalpopupextender's cancel button the page is refreshing loading with initialdata.Actually the page should not be refreshed and the page should stay what ever we have selected.Means i am using paging for the repeater's data.So if i select any page like 2,3... and click on modalpopupextender's cancel button the page is loading with initial data.

Can any one help regarding this?????

.aspx page
<asp:repeater id="RepeaterListJewelry" runat="server" onitemdatabound="RepeaterListJewelry_ItemDataBound" xmlns:asp="#unknown">
                    <itemtemplate>                        
                        <div class="display_hide" id="divBigImage" runat="server">
                            <div style="position: relative;">
                                <asp:image id="ImgMain" runat="server" />
                                <div class="small-img" id="divSmallImage" style="display: none" runat="server">
                                    <asp:image id="ImgSmall" runat="server" />
                                </div>
                            </div>
                            <div class="display_product2">
                                <a class="blue" href="#" id="ancDescription" runat="server">
                                    <asp:label id="lblDescription" runat="server"></asp:label></a>
                            </div>
                            <div class="display_product3" id="DivPrice" runat="server">
                            </div>
                            <div class="display_product4">
                                <table align="center" width="200" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td>
                                            <asp:imagebutton id="ImgShortInfo" runat="server" />
                                        </td>
                                        <td>
                                           <a id="ancViewDetail" runat="server"><img id="ImgViewDetail" runat="server" /></a>                                             
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>                  
                        <asp:panel id="pnlShortinfo" runat="server" backcolor="White" style="display:none"> 
                        <div style="margin:0px 0px 0px 0px;">                      
                            <div class="layout">
                            <div class="layoutin">
                            <div style="float:right;padding:15px 10px 0px 0px;"><asp:imagebutton id="ImgPnlClose" runat="server" imageurl="/images/close.gif" />
                            </div><br clear="all" />
                                <div class="prod_image">
                                    <asp:image id="Imgproduct" runat="server" imageurl="" />
                                </div>
                                <div class="detail">
                                    <div class="descrip" id="divProductDesc" runat="server" style="text-align: left">
                                    </div>
                                    <br />
                                    <div class="price_det" id="divTotalPrice" runat="server" style="text-align: left">
                                    </div>
                                    <br />
                                    <div class="view_det">
                                        <a class="brown" href="#" id="ancViewDetails" runat="server">View More Details</a></div>
                                    <div class="view_det">
                                        <a class="brown" href="#" id="ancAddWishlist" runat="server">Add To Wishlist</a></div>
                                </div>
                                <br clear="all" />
                                <div class="prod_det">
                                    PRODUCT DETAILS</div>                               
                                <div class="add_bag">
                                    <a id="ancAddToBag" runat="server">
                                        <img src="&lt;%=Application[" imagehost="]%&gt;/add_shop.gif" /></a></div>
                                 </div>
                            </div>
                        </div> 
                        </asp:panel>
                        
                        <ajaxtoolkit:modalpopupextender id="ModalPopupExtender1" runat="server" targetcontrolid="ImgShortInfo" popupcontrolid="pnlShortinfo" cancelcontrolid="ImgPnlClose" onokscript="displayPanel()" xmlns:ajaxtoolkit="#unknown">
                        </ajaxtoolkit:modalpopupextender>
                    </itemtemplate>
                </asp:repeater>
Posted
Updated 10-Jun-10 1:12am
v3
Comments
Sandeep Mewara 10-Jun-10 1:34am    
You are not clear in your last paragraph. Please use 'Improve question' to update and clarify what exactly is happening and whats the issue.

1 solution

instead of cancelcontrolid button write javascript for imageclose button.
It will work.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900