0
我有一個.net網站,c#codebehind。我有一個LinkButton控件,點擊後,我想在後端觸發一些代碼。不過,我還通過點擊按鈕觸發模式流行確認,以顯示在前端。模式彈出窗口會觸發,但它會抑制後端的代碼。有人能幫我弄清楚發生了什麼嗎?模態彈出抑制事件在表單的代碼隱藏中觸發
前:
<asp:LinkButton ID="lbWishlist" runat="server" rel="#wishlist" CssClass="modalInput" onclick="lbWishlist_Click"><img src="images/products_add_wishlist.jpg" border="0" /></asp:LinkButton>
<div class="modal" id="wishlist">
<h2>Succesfully added!</h2>
This item has been successfully added to your wishlist.
<br /><br />
<button type="button" class="close" style="width:70px;height:20px;border:1px solid #a2a2a2;color:#333333;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:9px;"> Close </button>
</div>
代碼隱藏:
protected void lbWishlist_Click(object sender, EventArgs e)
{
//some code
}
模式腳本:
<script type="text/javascript">
var triggers = $(".modalInput").overlay({
// some mask tweaks suitable for modal dialogs
mask: {
color: '#ebecff',
loadSpeed: 200,
opacity: 0.9
},
closeOnClick: false
});
</script>
請張貼顯示模式彈出窗口的代碼。 – Prash
對不起,只是用模態腳本編輯它 – optionsix