grvcourse.AllowPaging = false;
grvcourse.DataBind();
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
grvcourse.RenderControl(hw);
string gridHTML = sw.ToString().Replace("\"", "'")
.Replace(System.Environment.NewLine, "");
StringBuilder sb = new StringBuilder();
sb.Append("");
ClientScript.RegisterStartupScript(this.GetType(), "GridPrint", sb.ToString());
grvcourse.AllowPaging = true;
grvcourse.DataBind();
This is my code.The printing process is work , but after the printing, there is nothing in printed file. Is like blank.
Can anyone help me?
Thanks a lot for viewing my post. :-)

Asp.Net HeinPosted May 12, 2015, 9:43 PM
Asp.Net HeinPosted May 12, 2015, 5:39 AM
Nanhe SiddiquePosted May 12, 2015, 5:34 AM
http://www.c-sharpcorner.com/UploadFile/0a9ce9/printing-in-gridview-only-in-Asp-Net/
it may help you