Click here to Skip to main content
15,881,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I have a vb code that search for any .xml file which contains the word 'verify' in its title.

After finished searching, I would like the XML file to be displayed on the web browser via ASP.NET.

Is there any ways to achieve this?

Any help is greatly appreciated.

Below is how my current code looks like:

VB
Partial Class _Default
    Inherits System.Web.UI.Page
    Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        'To find subdirectories with a specific pattern/WILD CARD
        'ms-help://MS.VSExpressCC.v80/MS.NETFramework.v20.en/dv_vbcn/html/c9265fd1-7483-4150-8b7f-ff642caa939d.htm
        'Me.ListBox1.Items.Clear()
        Dim path As String = "\\" + TextBox1.Text + "\E$"
        Dim searchPattern As String = "*verify*.xml"
        For Each value As String In My.Computer.FileSystem.GetFiles(path, FileIO.SearchOption.SearchAllSubDirectories, searchPattern
                                                                    )
            ListBox1.Items.Add(value)
            'TextBox1.Text = "found"
        Next
    End Sub
    Protected Sub ListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox1.SelectedIndexChanged
    End Sub
    Protected Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
    End Sub
End Class
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900