Ok, so, this works for me quick and simple like.
VB code:
---------------------------------------------------------
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
doSplit()
End Sub
Private Sub doSplit()
Dim startDir As String = TextBox1.Text
Dim FinalDir As String = Mid(TextBox2.Text, 1, 3)
Dim filename As String = Mid(TextBox2.Text, 4, 4)
Dim myPath As String = startDir & "/" & FinalDir & "/" & filename & ".pdf"
If System.IO.File.Exists(Server.MapPath(myPath)) Then
myLink.text = "click here to view the pdf"
myLink.navigateUrl = myPath
Else
myLink.text = "File not found"
myLink.navigateurl = ""
End If
End Sub
--------------------------------------------------
Page code:
--------------------------------------------------
<asp:TextBox ID="TextBox1" runat="server" Width="42px">111</asp:TextBox>-<asp:TextBox ID="TextBox2" runat="server" MaxLength="7" Width="74px">2223333</asp:TextBox>
Prod Number<br />
<asp:Button ID="Button1" runat="server" Text="Button" /><br />
<br />
<asp:HyperLink ID="myLink" runat="server" Width="389px">HyperLink</asp:HyperLink>
------------------------------------------------
Directory Structure starting at root directory
111 'directory off root
222 'directory off root
333 'directory off 222
4444.pdf 'file in direcotyr '333'
---------------------------------------------
It creates a link to this file they are looking for. You could easily load it in an iframe, or current window or whatever. The files above are located off of the folder the aspx page is running in.
Please, let me know if this helps.