Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/465.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Ajax ModalPopUp Extendar在执行代码隐藏中的前几行之前弹出_C#_Javascript_Jquery_Asp.net_Ajax - Fatal编程技术网

C# Ajax ModalPopUp Extendar在执行代码隐藏中的前几行之前弹出

C# Ajax ModalPopUp Extendar在执行代码隐藏中的前几行之前弹出,c#,javascript,jquery,asp.net,ajax,C#,Javascript,Jquery,Asp.net,Ajax,我有一个ajax模式弹出扩展程序,我正在使用它来显示一个包含一些数据的gridview。似乎在数据绑定到GridView之前会弹出ModalPopp: protected void grdrequisitionraisedbyme_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName.Equals("viewhistory")) { GridV

我有一个ajax模式弹出扩展程序,我正在使用它来显示一个包含一些数据的gridview。似乎在数据绑定到GridView之前会弹出ModalPopp:

  protected void grdrequisitionraisedbyme_RowCommand(object sender, GridViewCommandEventArgs e)
    {
    if (e.CommandName.Equals("viewhistory"))
        {
            GridViewRow clickedRow = ((LinkButton)e.CommandSource).NamingContainer as GridViewRow;
            LinkButton lnkclaimno = (LinkButton)clickedRow.FindControl("lnkclaimno");
            DataSet ds = new DataSet();
            ds = GetHistory(lnkclaimno.Text.Trim());
            grvcapexhistory.DataSource = null;
            grvcapexhistory.DataBind();
            if (ds.Tables[0].Rows.Count > 0)
            {
                grvcapexhistory.DataSource = ds.Tables[0];
                grvcapexhistory.DataBind();
                popup.Show(); 
            }
          }  

  }
我在绑定
grvcapexhistory
的位置放置了一个调试器,但即使断点未到达
popup.Show()






摆脱Ajax弹出窗口并使用以下选项。它会解决你的问题

<asp:Panel ID="popup" runat="server" visible="false">
 <table style="position: fixed; z-index: 1; left: 0px; top: 0px"   border="0"  width="100%" height="100%">
    <tr>
        <td valign="top"  align="center"  >
        // below div will automatically expand as much as needed 
        <div class="yourmodalclass" style=" display:inline-block;margin-top:90px; ">        
        //put your GridView ID="grvcapexhistory" and other stuff here
 </div>
 </td>
 </table>
 </asp:Panel>

这是迄今为止我遇到的最简单的模式弹出窗口。我还没用过。我稍后会把它标记为答案+1.
<asp:Panel ID="popup" runat="server" visible="false">
 <table style="position: fixed; z-index: 1; left: 0px; top: 0px"   border="0"  width="100%" height="100%">
    <tr>
        <td valign="top"  align="center"  >
        // below div will automatically expand as much as needed 
        <div class="yourmodalclass" style=" display:inline-block;margin-top:90px; ">        
        //put your GridView ID="grvcapexhistory" and other stuff here
 </div>
 </td>
 </table>
 </asp:Panel>