Tuesday, October 6, 2009

Opening a PDF file from ASP.Net

Use this single line of Code instead of going for Process to start Adobe Reader. This opens in a New Tab or in new window leaving your existing project to work.

ScriptManager.RegisterStartupScript(this, this.GetType(), "", "window.open('../PDF/Sample.pdf','_blank');", true);

No comments:

Post a Comment