Jul 15, 2019 06:16 PM|Bulldog248|LINK
Below is a code sample where I open the pdf viewer to a specific file:
Protected Sub Button16_Click(sender As Object, e As System.EventArgs)
Dim SCH1 As String = String.Empty
If FormView1.CurrentMode = FormViewMode.ReadOnly Then
Dim SName As Label = TryCast(FormView1.FindControl("Schematic_PartLabel"), Label)
Dim SNameDD As DropDownList = TryCast(FormView1.FindControl("DropDownList5"), DropDownList)
If SNameDD.Visible = True Then
SCH1 = SCHpdf & SNameDD.SelectedItem.Text & ".pdf"
SCH1 = SCHpdf & SName.Text & ".pdf"
Response.ContentType = "application/pdf"
Context.Response.AddHeader("Content-Disposition", "inline; filename=" + SCH1)
The problem is that I have a different type of file I would like to open with a different viewer. In Windows explorer I can double click on the filename and it automatically associates with the correct viewer. How can I adapt the above code for a different
viewer? Filename extension = ".sldprt"; associated application = "EModelViewer.exe".