I have a datagrid that displays information related to various PDF documents including their filename. I want the user to select the row and then automatically navigate to the PDF document. The PDF's are all located in a "Documents" folder at the root of the site. My code is thus:
Private Sub GridView1_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles GridView1.SelectedIndexChanged
Dim mypath As String = "~/Documents/"
mypath = mypath + GridView1.SelectedRow.Cells(6).Text
TextBox1.Text = mypath
Response.Redirect(ResolveUrl(mypath))
End Sub
When this is executed the browser reports that it cannot find the requested resource even though the textbox shows the folder and filename are correct. If I substitute the full path in place of the relative path, it tell me it cannot open the web page.
Can someone tell me how to do this?
Thanks
?
???
...
Go to the complete details ...