感谢您花一点时间来看看这个。我知道对你们中的大多数人来说,编写客户端脚本很简单。无论如何,我只想在顶部显示一条消息,提醒用户他们的点击已注册并禁用该按钮。
<----代码如下---->
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="content">
<div>
<asp:TextBox BorderStyle="None" Font-Bold="True" Height="15" Width="300"
ForeColor="Green" runat="server" ID="MessageBox" Visible="False" Text="Archiving compliance results..."></asp:TextBox>
</div>
<table cellpadding="0" cellspacing="0">
<Table STUFF!> ....
<span>
<asp:ImageButton ID="ArchiveImageButton" runat="server" AlternateText="Archive Compliance"
ImageUrl="~/images/Icons/24/452-bank.gif" OnClientClick="archiveIt()" OnClick="btnArchive_Click" ToolTip="Archive compliance results" />
</span>
</Table STUFF!>
</table>
<script language="javascript" type="text/javascript">
function archiveIt() {
window.ArchiveImageButton.enabled = false;
window.MessageBox.visible = true;
}
</script>