2011-02-09 55 views
0

我有一個dotnet 2.0 web應用程序。如何禁用更新面板外的按鈕?

而且還有我的更新面板之外的按鈕...

內更新panel..i有一個GridView ......雖然分揀格,我需要禁用更新面板之外的按鈕。

請幫幫我。

<table> 
<tr> 
<td> 
    <UpdatePanel> 
     <gridview /> 
    </UpdatePanel> 
</td> 
</tr> 
<tr> 
<td> 
<Button /> 
</td> 
</tr> 
<table> 

編輯:

我試圖在服務器端下面的代碼排序功能 - 但不是工作

ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", 
         "<script>document.getElementById('" + ((Button)DualGridTableRow.FindControl(string.Concat(WebConstants.PriorityText, WebConstants.UpText))).ClientID + "').style.enabled ='False';</script>" 
         , true); 

回答

0

您可以在排序按鈕的onclick事件添加禁用功能(鏈接) 。不知道它是否優雅,但它會起作用。 只要一點,如果你需要它只是爲了禁用按鈕,而異步排序,我認爲這是不必要的。

相關問題