Asp.net| Search | show | keywords | match first create class library Model (business entity layer), create class: NewDina.CS to get the corresponding field name of the database.
Demo as follows:
[Copy to Clipboard] [ - ] Code:public class Newdina
{
#region Fields
private string _news_title = String.Empty;
private string _news_content = String.Empty;
private string _news_time;
#endregion
Public Properties#region Public Properties
public string News_title
{
get {return _news_title;}
set {_news_title = value;}
}
public string News_content
{
get {return _news_content;}
set {_news_content = value;}
}
public string News_time
{
get {return _news_time;}
set {_news_time = value;}
}
#endregion
}
And then create a class InaSet.CS the column is used to put the search keyword in an array to replace the keyword, making the search keyword red;
Demo as follows:
[Copy to Clipboard] [ - ] Code:public class Dinaset
{
Private ArrayList Dinarray = new ArrayList ();
Public ArrayList Dinarray
{
Get
{
return dinarray;
}
}
}
After the class is created, the interface is designed,
The function of the Keyword_tag (string str,string keyword) method is to replace the response keyword in the returned result data so that the query's keyword is red
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.