# C1.Web.Mvc.AutoCompleteBase-1.CustomHighlight

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Web_Mvc_AutoCompleteBase_1_CustomHighlight_" data-uid="C1.Web.Mvc.AutoCompleteBase`1.CustomHighlight*">CustomHighlight Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Web_Mvc_AutoCompleteBase_1_CustomHighlight_" data-uid="C1.Web.Mvc.AutoCompleteBase`1.CustomHighlight*"></a>
<h4 id="C1_Web_Mvc_AutoCompleteBase_1_CustomHighlight" data-uid="C1.Web.Mvc.AutoCompleteBase`1.CustomHighlight">CustomHighlight</h4>
<div class="markdown level1 summary"><p>Gets or sets a custom highlight function for highlighting matched text.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[JsonConverter(typeof(FunctionConverter))]
public virtual string CustomHighlight { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;JsonConverter(GetType(FunctionConverter))&gt;
Public Overridable Property CustomHighlight As String</code></pre>
</div>
<h5 id="C1_Web_Mvc_AutoCompleteBase_1_CustomHighlight_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The function takes three parameters: the data item, the current query text, and the display text after DisplayMemberPath processing. It returns the HTML to display for that item. Matches may be wrapped in any element; <code>wj-state-match</code> is the built-in highlight class. The HTML is rendered as-is and is not sanitized, so the function must escape any text it did not create; unescaped input allows cross-site scripting (XSS) attacks. The default value is null.</p>
</div>
</div>
