Tag: formview

FormView到Excel – 如何从模板中的控件拉出数据放置在单元格中

这里是布局,我有一个从SQL服务器进来的dynamic数据的FormView控件。 我正在使用FormView的ReadOnly模式。 我怎样才能调整PrepareFormViewForExport方法来删除文本框,并保留FormView中的值? 现在输出显示标签,但从文本框中删除值。 这是单击导出button时的C#代码。 protected void Bexport_Click(object sender, EventArgs e) { //Clear the Response object Response.Clear(); //set Response header to the Excel filename required (.xls for excel, .doc for word) Response.AddHeader("content-disposition", "attachment;filename=ReportOuput.xls"); Response.Charset = ""; // If you want the option to open the Excel // file without the save option then un-comment out […]