For some reason my update panel will not work on the server it works local on our test server and local dev boxes. I have the following code for my update panel within a jquery model the demo and live site are on the same instance of iis.
<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">×</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 -->Then my button handle event is as follows
Protected Sub btnNewGetVoucher_Click(sender As Object, e As EventArgs) Handles btnNewGetVoucher.Click End Sub
The reason why I have my button inside the update panel is that I want it to disappear when the customer clicks get voucher but please if anybody think that is wrong way to do it please let me no.
Note: I checked both web configs to make sure that the mode was not set to legacy and indeed it was commented out
<!--<xhtmlConformance mode="Legacy" />-->
Oh and the demo site and live site are on sep instances on the same iis so I no its not a case of its not installed.
Just for extended clarity here is my code that calls the modal.
<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>