开发者

how to disable a button outside my update panel?

开发者 https://www.devze.com 2023-02-09 07:16 出处:网络
I have a dotnet 2.0 web application. And there is a button outside my update panel... Inside update panel..i have a gridview ...While sorting grid, i need to disable the button outside the update pa

I have a dotnet 2.0 web application.

And there is a button outside my update panel...

Inside update panel..i have a gridview ...While sorting grid, i need to disable the button outside the update panel.

Please help me.

<table>
<tr>
 <td>
  <UpdatePanel>
       <gridview />
  </UpdatePanel>
 </td>
</tr>
&l开发者_如何学编程t;tr>
 <td>
 <Button />
 </td>
</tr>
<table>

EDIT:

I tried the below code on server side sorting function - but not working

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


You can add disable functionality in the onclick event of your sort buttons(links). Don't know if it is elegant, however it will work. Just one point, if you need it just for disabling button while async sort I think it is unnecessary.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号