Dim i
i = 1
Set regEx = New RegExp
regEx.Global = True
regEx.IgnoreCase = True
With Response
Set rs = cn.Execute(strSQL)
While Not rs.EOF
strTitle = rs("DTitle")
If blnPost Then
regEx.Pattern="(("& Request("keyWord") &"))"
strTitle = regEx.Replace(strTitle,"<font color='#ff0000'>$1</font>")
regEx.Pattern="(("& Request("keyWord2") &"))"
strTitle = regEx.Replace(strTitle,"<font color=""#ff0000"">$1</font>")
Else
regEx.Pattern="(("& Request("keyWord") &"))"
strTitle = regEx.Replace(strTitle,"<font color='#ff0000'>$1</font>")
End If
If i Mod 2 = 1 Then
.Write "<tr onmouseover=""this.bgColor='#C1D2EE'"" bgcolor='#FFFFFF' onmouseout=""this.bgColor=document.getElementById('DataGrid1').singleValue"">"
Else
.Write "<tr onmouseover=""this.bgColor='#C1D2EE'"" bgcolor='oldlace' onmouseout=""this.bgColor=document.getElementById('DataGrid1').oldValue"">"
End If
.Write "<td><a target='_blank' href='ShowDetail.asp?id=" & rs("objectGuid") & "'>" & strTitle & "</a></td><td><a target='_blank' href='ShowList.asp?id=" & rs("id") & "'>" & rs("STitle") & "</a></td><td>" & rs("CreateDate") & "</td></tr>"
rs.MoveNext
i = i + 1
Wend
rs.Close
Set rs = Nothing
End With