我需要點擊期間禁用按鈕,需要啓用我的服務器端事件完成 後,現在我的代碼看起來像這樣禁用和服務器事件後啓用的jQuery按鈕
<script src="../Scripts/jquery-1.3.2.js" type="text/javascript"></script>
<script type ="text/javascript" >
$(document).ready(function(){
$('.saveButton').bind("click", function(e) {
$(this).attr("disabled", "true");
return true; //causes the client side script to run.
});
});
</script>
//this works finr for disableing the button
//how to enable the button from disabled to enable after my server side event as executed
<asp:Button ID="Button1" runat="server" CssClass="saveButton" Text="Button"
onclick="Button1_Click" />
<asp:Button ID="Button2" runat="server" CssClass="saveButton" Text="Button"
onclick="Button2_Click" />
//Server side events
protected void Button1_Click(object sender, EventArgs e)
{
try
{
}
catch()
{
}
finally
{
//once my control reaches here i need to enable my save from disabled to enabled stae
// can we do this in jQuery
}
}
尋找這個從過去的2天代碼 在這個任何解決方案將是巨大的謝謝 謝謝
哎這裏發生了什麼是按鈕越來越細禁用一次我現在點擊button.but他並沒有叫我的服務器端event only ie protected void Button1_Click(object sender,EventArgs e) ///我的代碼 } – happysmile 2009-11-01 13:11:07