更新面板不在服务器上工作

时间:2017-09-06 07:38:04

标签: asp.net vb.net asp.net-ajax

由于某种原因,我的更新面板无法在服务器上运行,它在我们的测试服务器和本地开发盒上本地工作。

我在jquery模型中的更新面板中有以下代码

<div class="modal fade" id="myModal">
  <div class="modal-dialog">
    <div class="modal-content" style="text-align:left;">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span  style="display:none;" class="sr-only">Close</span></button>
        <h2 class="modal-title" align="center">10% Off Your Frist Order!</h2>
      </div>
      <div class="modal-body">
     <div class="clear"></div>
        <div class="input-group">
      <img src="" width="100%" alt="10% Off First Order" />
            <div style="float:left">
               *excludes.</div> 
           <div ></div>
          <span class="input-group-addon"><span class="glyphicon glyphicon-envelope"></span></span>
            <div style="clear:both;"></div>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
      ContentTemplate>
            <asp:TextBox ID="txtEmail" placeholder="Enter Email for Discount"  CssClass="emailField"  runat="server"></asp:TextBox>
                    <br />
         <asp:label runat="server" id="lblVoucher"  style="font-size:16px;"></asp:label>
                    <asp:Label ID="lblblerror" runat="server"  ForeColor="Red"></asp:Label>
                <asp:button runat="server" CausesValidation = "false" class="btn btn-primary  "   

               ID ="btnNewGetVoucher"    style="background-color:#007B78;color:white;align-self:center;height:55px;width:100%"  text="Get Voucher Code" />
  </ContentTemplate>
     </asp:UpdatePanel>

   </div>
  </div>
  <div class="modal-footer">
    <!-- Make sure to include the 'nothanks' class on the buttons -->

   </div>
</div><!-- /.modal-content -->

然后我的按钮处理事件如下

 Protected Sub btnNewGetVoucher_Click(sender As Object, e As EventArgs) Handles btnNewGetVoucher.Click


 End Sub 

显示调试的屏幕截图。   http://imgur.com/a/2qnDT

我在更新面板中有我的按钮的原因是我希望它在客户点击获取凭证时消失但是如果有人认为这是错误的方式,请让我不。

注意: 我检查了两个网络配置,以确保模式没有设置为遗留,实际上它已被注释掉

<!--<xhtmlConformance mode="Legacy" />-->

哦,演示站点和实时站点在同一个iis上的sep实例上,所以我不是没有安装它的情况。

为了更加清晰,这里是我调用模态的代码。

<script  type="text/javascript">

        // Delayed Modal Display + Cookie On Click
        $(document).ready(function () {

            console.log("Popup Code");


            $('#myModal').on('hidden.bs.modal', function () {
                // we want to trap the user closing the popup and we also set the cookie expiery here to seven days.
                $.cookie('mycookie', 'true', { expires: 604800000, path: '/' });
            })
            //if the cooke when the modal has been created is empty then display
            //the second one is for 
            if ($.cookie("mycookie") == null) {
                console.log("Popup Start");
                // Show the modal, with delay func.
                $('#myModal').appendTo("body");                
                $("#myModal").appendTo("form:first");           
                function show_modal() {
                    $.cookie('mycookie', 'true', { expires: 604800000, path: '/' });
                 $('#myModal').modal();
                    console.log("Popup Displayed after mymodal");
                }             
                // Set delay func. time in milliseconds
                window.setTimeout(show_modal, 10000);
            }




        });
</script>

0 个答案:

没有答案