【问题标题】:ModalPopupExtender not working in IE but working in FFModalPopupExtender 不在 IE 中工作,但在 FF 中工作
【发布时间】:2011-12-01 09:47:21
【问题描述】:

我正面临一个关键问题,我在我的页面中使用了 ajaxmodalpopupextender。 它在 FireFox 中工作正常,视野很好,但它不能正常工作,因为它显示在 IE 的一侧,而且背景看起来也不像设置的那样。

我尝试了几乎所有的东西

  1. 使用 CSS
  2. 在 div 中设置面板并设置

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

但没有什么可以得到这一切。请帮忙。

文档类型为:-

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

任何人请帮助我,我被卡住了..

请帮助pppppppp。

在经过同行评审之前,只有您可以看到此修改。

你在用什么版本的IE?你能把你的代码sn-p贴在这里吗?

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 的中心呈现弹出窗口,它的背景也没有按设置呈现。我完全被卡住了,请提前帮助。

【问题讨论】:

  • 有什么漂亮的东西在 IE 中正常工作?
  • 你用的是什么版本的IE?你能把你的代码sn-p贴在这里吗?
  • 我已经粘贴了,请检查一下?
  • Ranjan 尝试在您的 cmets 中使用 [at]username,该人会收到类似 @SunilSharma 的通知。
  • 感谢@OkayGuy,我现在是

标签: javascript asp.net css ajax xhtml


【解决方案1】:

我已经解决了问题,问题是页面上有一些 cmets,例如

<!--headersonly


Page Directives. Please dont go away with DW templates


headersonly//-->

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

我删除了所有这些,它在 IE 中也可以正常工作。

但是谁能解释一下是什么原因?

【讨论】:

    猜你喜欢
    • 2010-12-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-04-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多