asp search page help.
Hi,
There is this link <a href="www.jockme.com/pastoral_correctional.htm">Correctional Ministries</a> on my html page.
I am using this search that displays the results of my find which is just searching text files and my program is displaying the link: pastoral_correctional.htm as the search results.
IE.
Search Results:
- pastoral_correctional.htm
I want to display the value: Correctional Ministries instead, and it will link to the pastoral_conrrectional.htm page. HOw can i do that?
Here is the code for my search when i click on the word search it jumps to this asp page displaying my results.
<HTML><BODY>
<B>Search Results for <%=Request("SearchText")%></B><BR>
<%
Const fsoForReading = 1
Dim strSearchText
strSearchText = Request("SearchText")
'Now, we want to search all of the files
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Dim objFolder
Set objFolder = objFSO.GetFolder(Server.MapPath("/"))
Dim objFile, objTextStream, strFileContents, bolFileFound
bolFileFound = False
For Each objFile in objFolder.Files
If Response.IsClientConnected then
Set objTextStream = objFSO.OpenTextFile(objFile.Path,fsoForReading)
strFileContents = objTextStream.ReadAll
If InStr(1,strFileContents,strSearchText,1) then
Response.Write "<LI><A HREF=""/" & objFile.Name & _
""">" & objFile.Name & "</A><BR>"
bolFileFound = True
End If
objTextStream.Close
End If
Next
if Not bolFileFound then Response.Write "No matches found..."
Set objTextStream = Nothing
Set objFolder = Nothing
Set objFSO = Nothing
%>
</BODY></HTML>
thanks
|