I think I found a bug in Microsoft Explorer 7. When I launch a modal popupwindow or a java alert box (using ScriptManager.RegisterClientScriptBlock) from within an Update Panel, the whole screen is being pushed about 15 pixels downwards, if the page has a masterpage. It seems to work alright for pages without masterpages.
I have tested my application in IE6, IE7 and Mozilla Firefox. Internet Explorer 7 is the only browser having this issue. It doesn't matter if the update panel encapsulates just the button or everything in the content page, the problem is still there. It seems to me now that my only option is to detach all content pages with this issue from the master page by creating duplicate menus.
If anyone knows something please let me know.
I discovered that the problem occurs even when a button is clicked.
Steps to replicate the error.
1. Go New Website, ASP.NET AJAX CTP enabled website/Visual Basic
2. Create MasterPage.master
3. Create Default2.aspx with MasterPage.master as masterpage
4. Copy the following block to Default.aspx(Source)
<%@. Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" title="Untitled Page" %><asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px"> <asp:UpdatePanel id="x" runat="server"> <ContentTemplate><asp:Button id="Button1" runat="server" Text="Button" ></asp:Button> </ContentTemplate> </asp:UpdatePanel> </asp:Panel></asp:Content>
5. Copy the following block to MasterPage.master(Source)
<%@. Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head id="Head1" runat="server"> <title>Untitled Page</title> </head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ModalPopUpTestExScriptmanager" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> </asp:UpdatePanel> <asp:contentplaceholder id="ContentPlaceHolder1" runat="server"> </asp:contentplaceholder> </form></body></html>
6. Start the application and click the button. If you use IE7 as a browser the button will be relocated when you click it the first time. It works for me in Firefox and IE6.
Correction: Item no 4 should be: "4. Copy the following block to Default2.aspx(Source)" and nothing else
When I remove the update panel from the master page everything function normally. The problem seems to happen in IE7 especially when both the content page and master page have an update panel each. Personally, I don't need an update panel in my masterpage. The update panel in my masterpage was completely redundant and unnecessary. The reason I had it there at all is that I was experimenting some time ago with top menus in update panels and I must have forgotten to remove it. Thanks
I installed Visual Studio .NET 2005 with Ajax RC 1.0 and Futures Dec CTP in my PC and tested your codes in your?last?post. I?found?it?worked?fine?in?IE?7.0.
Try to add "<asp:ScriptManagerProxy runat="server"></asp:ScriptManagerProxy>" to the content page?as?the?following and check if it works.
<%@. Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" title="Untitled Page" %
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManagerProxy runat="server"></asp:ScriptManagerProxy>
<asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px">
<asp:UpdatePanel id="x" runat="server">
<ContentTemplate>
<asp:Button id="Button1" runat="server" Text="Button" ></asp:Button>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
</asp:Content>
Wish the above can help you.
I installed Visual Studio .NET 2005 with Ajax RC 1.0 and Futures Dec CTP in my PC and tested your codes in your?last?post. I?found?it?worked?fine?in?IE?7.0.
Try to add "<asp:ScriptManagerProxy runat="server"></asp:ScriptManagerProxy>" to the content page?as?the?following and check if it works.
<%@. Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" title="Untitled Page" %
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManagerProxy runat="server"></asp:ScriptManagerProxy>
<asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px">
<asp:UpdatePanel id="x" runat="server">
<ContentTemplate>
<asp:Button id="Button1" runat="server" Text="Button" ></asp:Button>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
</asp:Content>
Wish the above can help you.
No comments:
Post a Comment