突出显示搜索结果 [英] Highlight search results

查看:107
本文介绍了突出显示搜索结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好..
我已经在asp.net中使用ajax实现了搜索功能.在这里我使用了脚本管理器,文本框,realtimesearchmonitor,updatepanel,gridview和sqldatasource..
一切正常..但我希望搜索功能像在文本框中键入的内容一样突出显示gridview中的文本..
有什么想法吗?
CS文件上有任何附加内容吗?
我的cs文件是这样的:

Hi all..
I''ve implemented search function using ajax in asp.net..where i used scriptmanager,textbox,realtimesearchmonitor,updatepanel,gridview and sqldatasource..
All works fine..but i want the search function highlight the text in the gridview as what i type in the textbox..
Any ideas?
any add on on the cs-file?
My cs file is like this :

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace Search
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }
    }
}

推荐答案

看看这篇文章:在GridView中实现搜索并突出显示结果 [ ^ ]

这看起来像您要尝试执行的操作.它应该可以帮助您.
Have a look at this article:Implementing search in GridView and highlight results[^]

This looks like the thing you are trying to do. It should help you out.


这篇关于突出显示搜索结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆