Telerik is a leading vendor of ASP.NET AJAX, ASP.NET MVC, Silverlight, WinForms and WPF controls and components, as well as .NET Reporting, .NET ORM , .NET CMS, Code Analysis, Mocking, Team Productivity and Automated Testing Tools. Building on its expertise in interface development and Microsoft technologies, Telerik helps customers build applications with unparalleled richness, responsiveness and interactivity. Telerik products help thousands of companies to be more productive and deliver reliable applications under budget and on time.
Version Q2 2011 released 07/12/2011
select

Spell / Custom Google spellcheck provider

Sample textbox
Text

  • RadSpell

    The SpellCheckProviderTypeName property of RadSpell allows the developers to specify a custom spell check provider instead of the default one. This way they can create custom spellchecking algorithms and control the given suggestions for the misspelled words.

    This example show how to create a custom spell check provider, which sends a XML HTTP Post request to Google in order to check the misspelled words and get the correction suggestions. One positive feature of the example is that there is no need to have a dictionary file, for example en-US.tdf, in order to get the RadSpell working. However you loose the functionality to add custom words in the dictionary. This is the reason why you need to disable the Add Custom button in the Spell Check dialogue. You should set the AllowAddCustom property of the RadSpell element to false.
    e.g.
    <telerik:RadSpell ID="RadSpell1" runat="server" ControlToCheck="TextBox1" AllowAddCustom="false"/>

    You can find the definition of the GoogleSpellCheckProvider class in the DefaultCS.aspx.cs or DefaultVB.aspx.vb source files attached to this example.

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Page CodeFile="DefaultVB.aspx.vb" Inherits="Telerik.Web.Examples.Spell.WhatsNew.DefaultVB" Language="vb" AutoEventWireup="true" %>

    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="qsf" TagName="Header" Src="~/Common/Header.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="Footer" Src="~/Common/Footer.ascx" %>
    <!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">
        <qsf:HeadTag runat="server" ID="Headtag1"></qsf:HeadTag>
        <style type="text/css">
            .smallModule textarea
            {
                width: 470px;
            }
        </style>
    </head>
    <body class="BODY">
        <form runat="server" id="mainForm" method="post">
        <qsf:Header ID="Header1" runat="server" NavigationLanguage="VB"></qsf:Header>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
        <telerik:RadFormDecorator Visible="true" ID="RadFormDecorator1" runat="server" DecoratedControls="All" />
        <fieldset style="float: left; width: 460px;">
            <legend>Sample textbox</legend>
            <asp:Panel ID="Panel1" runat="server" Style="margin: 5px">
            <div>Text</div>
    <asp:TextBox ID="TextBox1" Style="height: 200px; width: 410px"
    runat="server" Rows="5" Columns="50" TextMode="MultiLine">RadSpell enablez developerz to add multilngual spellchecking capabilties to their ASP.NET applications.</asp:TextBox>

            </asp:Panel>
            <div style="padding: 5px 5px 10px 5px;">
                <telerik:RadSpell ID="RadSpell1" runat="server" ControlToCheck="TextBox1" AllowAddCustom="false"/>
            </div>
        </fieldset>
        <qsf:Footer ID="Footer1" runat="server"></qsf:Footer>
        </form>
    </body>
    </html>

Get more than expected!

 
 

Take your time to truly experience the power of RadControls for ASP.NET AJAX with a free 60-day trial backed up by Telerik’s unlimited dedicated support.

Download your RadControls for ASP.NET AJAX trial and jumpstart your development with the available Getting Started resources.

If you have any questions, do not hesitate to contact us at sales@telerik.com.

Copyright 2002-2024 © Telerik. All right reserved
Telerik Inc, 201 Jones Rd, Waltham, MA 02451