0
運行進程時是否可以禁用ImageButton?處理時是否可以禁用ImageButton?
我找到了一種方法來禁用按鍵處理的時候,這樣做:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
Dim strProcessScript As String = "this.value='Processing...';this.disabled=true;"
btnProcess.Attributes.Add("onclick", (strProcessScript + ClientScript.GetPostBackEventReference(btnProcess, "").ToString))
End If
End Sub
但它沒有對工作的ImageButton。
而且,我想這個代碼對禁用了的ImageButton:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
Dim strProcessScript As String = "this.value='Processing...';this.disabled=true;"
btnProcess.Attributes.Add("onclick", (strProcessScript + ClientScript.GetPostBackEventReference(btnProcess, "").ToString) + ";return false;")
End If
End Sub
無論那些都使得ImageButton的時候處理,但它工作在按鈕被禁用。