[求救]gridview导出之后身份证号是科学计数法
gridview导出之后身份证号是科学计数法,显示之后数据最后几位全是0了。找了半天,改不对啊!!
private void Export(string FileName) { Response.Clear(); Response.Buffer = true; Response.Charset = "GB2312"; Response.ContentEncoding = System.Text.Encoding.UTF7; Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(FileName, Encoding.UTF8).ToString() + ".xls"); Response.ContentType = "application/ms-excel"; this.EnableViewState = false; StringWriter tw = new StringWriter(); HtmlTextWriter hw = new HtmlTextWriter(tw); GridView1.RenderControl(hw); Response.Write(tw.ToString()); Response.End(); } public override void VerifyRenderingInServerForm(Control control) { } protected void printout_Click(object sender, EventArgs e) { Export("学生报名信息"); }}