How to open PDF file using JS?

by barkkathulla 2013-08-03 09:48:09

How to open PDF file using JS?

Diagnostics namespace is a process class to help for this task.

using System.Diagnostics;

In form design give this in button click part

string myFileName = "D:\fancy.pdf";
System.Diagnostics.Process.Start(myFileName);


<script type="text/javascript">
function openWindow(yourfilepath)
{
var myWin = window.open(' " + myFileName + " ','mywindow','width=400,height=200');
}
</script>


<input type="button" onClick="openWindow(variable)">

734
like
0
dislike
0
mail
flag

You must LOGIN to add comments