Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

How can i use ajax Model popup on image button click inside gridview ?

$
0
0

I need the model popup control  when ever detail button  i.e an image button inside gridview is clicked ,for that i did:

<table class="tbsurvey"><tr><td colspan="3" class="tdheader"> &nbsp;</td></tr><tr><td></td></tr><tr><td>&nbsp;&nbsp;<asp:Label ID="lblwebsector" runat="server" Text='<%#Eval("webSecName")%>'></asp:Label></td></tr><tr><td><asp:Panel ID="plgrid" runat="server"><div class="plsection"><asp:GridView ID="gridQuestion" runat="server" AutoGenerateColumns="False"
        CellPadding="4" ForeColor="#333333" GridLines="None" Width="815px"
        DataKeyNames="FKSectionID"
        onpageindexchanging="gridQuestion_PageIndexChanging" AllowPaging="True"
        PageSize="3" onrowcommand="gridQuestion_RowCommand" ><AlternatingRowStyle BackColor="White" ForeColor="#284775" /><Columns><asp:TemplateField HeaderText="S.no" ItemStyle-VerticalAlign="Top"  ControlStyle-Width="5px"><ItemTemplate>
        Section&nbsp;#&nbsp;<%#Container.DataItemIndex+1 %></ItemTemplate><ControlStyle Width="5px" /><ItemStyle VerticalAlign="Top" /></asp:TemplateField><asp:BoundField HeaderText="Section" DataField="sectioName" /><asp:BoundField HeaderText="No Of Questions" DataField="noOfQuestion" /><asp:TemplateField><ItemTemplate><asp:ImageButton ID="btnSection33" runat="server" CausesValidation="false" CommandArgument='<%#Eval("FKSectionID")%>' CommandName="selectSection" ToolTip="Select Section" height="20px" Width="20px" ImageUrl="~/images/survey/select2.png" onclick="btnSection33_Click" /></ItemTemplate></asp:TemplateField><asp:TemplateField><ItemTemplate><asp:HiddenField ID="hdsection" runat="server" Value='<%#Eval("FKSectionID")%>' /></ItemTemplate></asp:TemplateField><asp:ButtonField Text="Button"  /></Columns><EditRowStyle BackColor="#999999" /><FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /><HeaderStyle BackColor="#009900" Font-Bold="True" ForeColor="White"
            Font-Size="14px" HorizontalAlign="Left" VerticalAlign="Middle" /><PagerStyle BackColor="#333333" ForeColor="White" HorizontalAlign="Center" /><RowStyle BackColor="#F7F6F3" ForeColor="#333333" Font-Size="13px"
            HorizontalAlign="Left" VerticalAlign="Middle" /><SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" /><SortedAscendingCellStyle BackColor="#E9E7E2" /><SortedAscendingHeaderStyle BackColor="#506C8C" /><SortedDescendingCellStyle BackColor="#FFFDF8" /><SortedDescendingHeaderStyle BackColor="#6F8DAE" /></asp:GridView></div></asp:Panel></td></tr><tr><td></td></tr><tr><td><asp:ModalPopupExtender
ID="ModalPopupExtender1" runat="server"
CancelControlID="imgClose"
DropShadow="True"
PopupControlID="plquestion"
TargetControlID="btnSelect"></asp:ModalPopupExtender><asp:Panel ID="plquestion" runat="server" Width="813px"><div><asp:ImageButton ID="imgClose" runat="server"
ImageUrl="~/images/register/cross.png"
ToolTip="Exit Questions of the Sections" /></div><div class="plquestion"></div></asp:Panel></td></tr><tr><td><asp:Button ID="btnSaveSurvey" runat="server" Text="Save" CssClass="btnsubmitsurvey" onclick="btnSaveSurvey_Click" /><asp:Button ID="btnsubmit" runat="server" Text="Submit" CssClass="btnsubmitsurvey" onclick="btnsubmit_Click" /><br /></td></tr></table>

ERROR :

Server Error in '/' Application.


The TargetControlID of 'ModalPopupExtender1' is not valid. A control with ID 'btnSection33' could not be found.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The TargetControlID of 'ModalPopupExtender1' is not valid. A control with ID 'btnSection33' could not be found.

What to do ?




Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>