本文介绍了asp.net中启用了btn的属性语句执行问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我写btnExcel.Enabled = true;在下面的语句之后,为什么不执行.

收合|复制代码

Rpt.ExportToHttpResponse(ExportFormatType.Excel,Response,true,"Report");




收合|复制代码

Rpt.ExportToHttpResponse(ExportFormatType.Excel,Response,true,"Report");

btnExcel.Enabled = true;



好的,有人给了我解决方案

那是

收合|复制代码

它会覆盖响应对象,因此按钮的禁用部分不会包含在响应对象中.因此请在此事件之前或之后使用javascript禁用按钮.

我在此事件之前或之后使用javascript禁用了按钮.

if i write btnExcel.Enabled = true; after below statement then why not executed.

Collapse | Copy Code

Rpt.ExportToHttpResponse(ExportFormatType.Excel, Response, true, "Report");


ie.

Collapse | Copy Code

Rpt.ExportToHttpResponse(ExportFormatType.Excel, Response, true, "Report");

btnExcel.Enabled = true;



ok someone gave me solution

that is

Collapse | Copy Code

It overrides the response object so the disabled portion of the button is not getting included in the response object. so use javascript before or after this event to disable the button.

i use javascript before or after this event to disable the button.
still not working?

推荐答案


这篇关于asp.net中启用了btn的属性语句执行问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 01:08