110,566
社区成员
发帖
与我相关
我的任务
分享
LinkButton onebtn = (LinkButton)sender;
GridViewRow gr = onebtn.Parent.Parent as GridViewRow;
int rowindex = gr.RowIndex;
Response.Clear();
Response.Buffer = true;
Response.Charset = "GB2312";
Response.AppendHeader("Content-Disposition", "attachment;filename=List.xls");
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.ContentType = "application/vnd.ms-excel";
System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);
for (int i = 0; i < this.dgrd_AppInfo.Rows.Count; i++)
{
this.dgrd_AppInfo.Rows[i].Visible = false;
}
this.dgrd_AppInfo.Rows[rowindex].Visible = true;