asp.net search matching keyword for red display code

Source: Internet
Author: User

First create class library Model (business entity layer), create class: NewDina.CS is used 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;
      }
    }
  }

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.