hi friends,
i would like to create print preview control. It would display all the data present in the current page even the data hide in scrolled contant..
with thanks,
Gopinath G
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Javeed M ShaikhPosted Nov 11, 2011, 10:45 AM
an example with gridview is like this...
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
GridView1.RenderControl(hw);
string previewHTML = sw.ToString().Replace("\"", "'")
.Replace(System.Environment.NewLine, "");
Now you can use previewHTML variable for preview.