Ajax modal popup extender not working in IE 8
I'm using ASP.NET 3.5 web forms, ASP.NET AJAX and ASP.NET AJAX Control Toolkit. I have a series of images, loaded at small size. When I click on it, I want to be displayed as a modal popup at a larger size. I implemented it, the larger image is shown in a panel. It works fine in Mozilla Firefox 3.6, Google Chrome 4 but the modal popul is shown at the bottom of the page in IE 8. I have to scroll down te page in order to see the popup, instead of having it shown in the middle of the screen as for Firefox and Chrome.
What should I do?
Environment: Windows 7 x32, VS 2008 SP1, .NET Framework 3.5 SP1.
Thanks
EDIT Inside an updatepanel's contenttemplate I have a listview whose itemtemplate is:
<ItemTemplate>
<td>
<asp:Image Width="200px" Height="200px" ID="thumbnail" runat="server" ImageUrl='<%# "../LoadImage.ashx?t=myImage&ids=" + Eval("Id") %>' />
<cc1:ModalPopupExtender ID="Image1_ModalPopupExtender" runat="server" DynamicServicePath=""
Enabled="True" PopupControlID="panel_bigImage" TargetControlID="thumbnail"
DropShadow="False" OkControlID="BigImage" CancelControlID="btnCloseImage" >
</cc1:ModalPopupExtender>
<asp:Panel ID="panel_bigImage" runat="server" DefaultButton="btnCloseImage" EnableViewState="True" HorizontalAlign="Center" ScrollBars="Auto" BorderStyle="Outset" BackColor="White">
<asp:Image ID="BigImage" Height="600px" runat="server" ImageUrl='<%# "../LoadImage.ashx?t=myImage&ids=" + Eval("Id")%>' />
<br />
<asp:Button ID="btn开发者_JS百科CloseImage" runat="server" Text="Inchide" />
</asp:Panel>
</td>
</ItemTemplate>
Solved.. the main problem was that the page was set with HTML doctype... Changing it to XHTML transitional fixed this issue.
精彩评论