ModalPopupExtender不在IE中工作但在FF中工作

时间:2011-12-01 09:47:22

标签: javascript asp.net css ajax xhtml

我正面临一个严重的问题,我在我的页面中使用了ajaxmodalpopupextender。 它在FireFox中工作得很好,视野很好,但是它在IE中的一侧显示不正常,背景也不像设置那样。

我尝试了几乎所有的事情,比如

  1. 使用CSS
  2. 将面板置于div并设置

    div style="position:absolute;left:140;top:100;"
    
  3. xhtml页面的文档类型

  4. 但没有什么可以解决这一切。请帮忙。

    Doctype如下: -

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    

    任何人请帮助我,我被困了..

    请helpppppppppp。

    此修改仅在您进行同行评审之前才可见。

    你正在尝试使用哪个版本的IE?你可以在这里粘贴你的代码片段吗?

    GridView在这里: -

    <GridView id= "Grd" runat="server" AutoGenerateColumns="false" CssClass="GridStyle"    
               HeaderStyle-Font-Size="Small" Width="960" Visible="false">   
              <Columns>             
    
              'Columns goes here             
              <asp:TemplateField HeaderText="Action" HeaderStyle-Width="310px" ItemStyle-HorizontalAlign="Left">   
              <ItemTemplate>   
                  <asp:Button ID="btnDelete" runat="server" Text="Delete" OnClick="btnDelete_Click"    
                  CommandArgument='<%#Eval("intHireEnquiryID") %>' />   
                  <asp:Button ID="btnPlace" runat="server" Text="Place" OnClick="btnPlace_Click"     
                  CommandArgument='<%#Eval("intHireEnquiryID") %>' />   
    
              </ItemTemplate>   
              </asp:TemplateField>   
              </Columns>             
              </GridView>           
    

    ModalPopup这里: -

    <asp:UpdatePanel ID="upPopupPnl" runat="server" UpdateMode="Conditional">  
                <ContentTemplate>              
                <asp:Panel runat="server" ID="pnlPopup" Width="300px" Height="300px" BackColor="Azure"   
                style="overflow:auto;border-color:Black;border-style:solid;border-width:2px;">  
                <table><tr><td colspan="2" style="width:300px;">  
                <asp:RadioButtonList ID="rbl1" runat="server">  
                </asp:RadioButtonList>            
                </td></tr>  
                <tr><td style="text-align:center;">  
                <asp:Button ID="btnPlacePopup" runat="server" Text="Place" Width="100" Height="35" Font-Bold="true"   
                OnClick="btnPlacePopup_Click" />  
                </td>  
                <td style="text-align:center;">  
                <asp:Button ID="btnCancel" runat="server" Text="Cancel" Width="100" Height="35" Font-Bold="true" />  
                </td></tr>  
                </table>  
                </asp:Panel>  
                <asp:Button ID="btnDummy" runat="server" Text="Not Display" style="display:none;"/>  
                <ajaxtk:ModalPopupExtender ID="actPopup1" runat="server" TargetControlID="btnDummy" BackgroundCssClass="modalBackground"    
                PopupControlID="pnlPopup" CancelControlID="btnCancel">  
                </ajaxtk:ModalPopupExtender>   
                </ContentTemplate>  
                </asp:UpdatePanel>  
    

    Css类如下: -

    .modalBackground   
    {   
      background-color:#B3B3CC;   
      opacity:0.5;  
    } 
    

    代码背后: -

    dim intHireEnquiryIDas integer   
    Protected Sub btnPlace_Click(ByVal sender As Object, ByVal e As System.EventArgs)  
            intHireEnquiryID = CType(sender, Button).CommandArgument  
            Dim EXP As New Exception  
            Dim params(0) As SqlParameter  
            params(0) = New SqlParameter("@intHireEnquiryID", intHireEnquiryID)  
            Dim DS As New DataSet  
            DS = execQuery("spAgent_Get_Assigned_Workers", executionType.SPExecuteForDS, EXP, params)  
            If DS.Tables(0).Rows.Count > 0 Then  
                rbl1.DataSource = DS  
                rbl1.DataTextField = "WorkerDetail"  
                rbl1.DataValueField = "intWorkerID"  
                rbl1.DataBind()              
            End If  
            upPopupPnl.Update()  
            actPopup1.Show()  
        End Sub  
    

    它在FireFox中工作得很好,但是在IE中没有渲染弹出窗口,它的背景也没有按照设置进行渲染。我完全被困了,请提前帮助thnx。

1 个答案:

答案 0 :(得分:1)

我已经删除了问题,问题是页面上有一些评论,如

<!--headersonly


Page Directives. Please dont go away with DW templates


headersonly//-->

<!--<%@ Register Src="~/uc/uc_pager.ascx" TagName="pager" TagPrefix="uc1" %> -->

我删除了所有内容,它在IE中运行良好。

但任何人都可以解释原因是什么吗?

相关问题