Rajkumar Reddy

Rajkumar Reddy

  • NA
  • 5
  • 11.3k

How to open a pdf file in silverlight after hosting?

Aug 18 2011 2:46 AM
I have a product.pdf in my clientbin(silverlight) folder which contains detail about product on click of button just i want to open that pdf i used following code it's working fine locally after hosting it is giving HTTP Error 404.0 - Not Found

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable. how can i do that one please help me


** service and calling aspx page in silverlight**

 

  Dim uri As New Uri(HtmlPage.Document.DocumentUri, "/ClientBin/product.pdf")
  'HtmlPage.Window.Navigate(uri, "_blank")
  Dim path As String = uri.AbsoluteUri.ToString()
  ' HtmlPage.Window.Eval("window.open('" & path & "')")
  HtmlPage.Window.Eval("document.location.href='" & path & "';")


** Error code After hosting **

  HTTP Error 404.0 - Not Found
  The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.



Answers (2)