在加载时添加下面两条语句
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
#region 遮罩按钮
this.Download.Attributes.Add(" onclick ", ClientScript.GetPostBackEventReference (Download, " Click ") + " ;this.disabled=true; this.value=‘同步中…’; “); this.btnImport.Attributes.Add(” onclick ", ClientScript.GetPostBackEventReference (btnImport, " Click ") + " ;this.disabled=true; this.value=‘上传中…’;
#endregion
}
}