Problem showing a modal pop extender from a grid view
Hi Friends,
All I am trying to do is to populate a modal popup gridview from a grid views link button click.
Please see my code below. I am not using any update panels.
----Gridview1
<asp:TemplateField HeaderText="Compensation " SortExpression="Compensation">
<HeaderStyle Wrap="False" Font-Bold="True" HorizontalAlign="Center"
VerticalAlign="Top" />
<itemstyle wrap="False" horizontalalign="Left" />
<itemtemplate>
<asp:LinkButton ID="lbcompensation" Text="Link Button" runat="server" OnClick="lbcompensation_OnClick"> </itemtemplate>
<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" >
<asp:Button ID="btnTarget" runat ="server" style="display:none" />
<cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
PopupControlID="PopupPanel" TargetControlID="btnTarget">
<asp:Panel ID="Panel1" runat="server" Height="169px"
Width="268px">
<asp:Button ID="Button1" runat="server" Text="Button" />
.cs file
protected void lbcompensation_OnClick(object sender, EventArgs e)
{
this.ModalPopupExtender1.Show();
}
Now I am not getting the modal pop up with the gridview.when I put a break point near modalpopupextender.show() I am getting There is no source code available for the current location error.
Am I missing something? Is there something that I need to add to my code? Please let me know.
when I click on show disassembly I am getting below details
--- d:\hg\act\Server\AjaxControlToolkit\ModalPopup\ModalPopupExtender.cs -------
00000000 push ebp
00000001 mov ebp,esp
00000003 sub esp,8
00000006 mov dword ptr [ebp-8],ecx
00000009 cmp dword ptr ds:[011C9588h],0
00000010 je 00000017
00000012 call 6AFF6BB9
00000017 lea eax,[ebp-4]
0000001a mov word ptr [eax],0
0000001f lea ecx,[ebp-4]
00000022 mov edx,1
00000027 call 65F87CB0
0000002c lea eax,[ebp-4]
0000002f movsx eax,word ptr [eax]
00000032 mov edx,dword ptr [ebp-8]
00000035 mov word ptr [edx+5Ch],ax
00000039 nop
0000003a mov esp,ebp
0000003c pop ebp
0000003d ret