Dear All,
I have a pdf file in my client bin folder on click of button i want to open a pdf how can i do that please help me.
Advance Thanks,
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.
Priya LingePosted Aug 18, 2011, 1:31 AM
You can open the pdf file as below,
In ClientBin folder ,i have pdf file ,named sam.pdf.
On button click i open this pdf,
private void button1_Click(object sender, RoutedEventArgs e)
{
Uri uri = new Uri(HtmlPage.Document.DocumentUri, "/ClientBin/sam.pdf");
//HtmlPage.Window.Navigate(uri, "");
string path = uri.AbsoluteUri.ToString();
HtmlPage.Window.Eval("window.open('" + path + "')");
//HtmlPage.Window.Eval("document.location.href='" + path + "';");
}
Hope this will help you.
Thanks.