Spell - Ignore Text Fragments




Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

By default RadSpell ignores URL addresses, email addresses and file names in the target text. You can turn those settings on and off using the IgnoreFragments property.

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
<%@ Page CodeFile="DefaultCS.aspx.cs" Language="C#" AutoEventWireup="true" Inherits="Telerik.Web.Examples.Spell.IgnoreSettings.DefaultCS" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container size-narrow">
        <textarea id="textarea1" style="width:100%; height:100px">This is the default ignore behavior. Please visit our page at http://www.yourdomain.com, download the sample file and save it to C:\myfiles\sample.doc. Please contact admin@yourdomain.com if you have any problems with the download.</textarea>
        <br />
        <telerik:RadSpell RenderMode="Lightweight" ID="spell1" runat="server" ControlToCheck="textarea1" IsClientID="true"
            FragmentIgnoreOptions="All" ButtonText="Ignore URL's, Files, and Emails"></telerik:RadSpell>
        <br />
        <textarea id="textarea2" style="width:100%; height:100px">We do not ignore email addresses.  File names and URL addresses are not flagged as errors. Please visit our page at http://www.yourdomain.com, download the sample file and save it to C:\myfiles\sample.doc. Please contact admin@yourdomain.com if you have any problems with the download.</textarea>
        <br />
        <telerik:RadSpell RenderMode="Lightweight" ID="spell2" runat="server" ControlToCheck="textarea2" IsClientID="true"
            FragmentIgnoreOptions="FileNames, Urls" ButtonText="Do not ignore Emails"></telerik:RadSpell>
    </div>
    </form>
</body>
</html>

Find Assistance

Help Us Improve

Was this example helpful?