Post by Gang_WarilyHi
I think ASP.net may not affect the hit highlighter.
It is accessed by putting parameters in the URL address.
http://msdn2.microsoft.com/en-us/library/ms692928.aspx
is the documentation for webhits.dll, with examples ...
Post by savvas stampolloglouI am creating a search engine with asp.net but until now i haven't
found a working solution
for using the hit highlighter.
Has anyone managed to do it until now?
And if possible if you can give any examlpe
Thanks in advance!
don't use the highlighter, built your own one ...
1) Define a new CSS-Class which makes the text highlighted (i.e. yellow
background)
2) Write a function to change your search-results ...
3) in your results HTML-Code let the function enlose your search-phrase
with your new CSS-tag
works fine, is fast & short
regards
Fred (from Germany)
THE FUNCTION:
Function Highlight(Search_Str as String, InputTxt as String, StartTag as
String, EndTag as String) As String
Return Regex.Replace(InputTxt, "(" & Regex.Escape(Search_Str) & ")",
StartTag & "$1" & EndTag, RegExOptions.IgnoreCase)
End Function
THE FUNCTION CALL:
MyHigLightedHTMLCode = Highlight(MySearchString, MyHTMLCode, "<span
class=highlight>", "</span>")