<%@ Page Language="C#" AutoEventWireup="true" Codebehind="Default.aspx.cs" Inherits="SimpleCustomTextSource._Default" %>

<%@ Register Assembly="RadSpell.Net2" Namespace="Telerik.WebControls" TagPrefix="radS" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <title>Untitled Page</title>
</head>
<body>

  <script type="text/javascript">
    //<!--
   
      function MyTextSource()
      {
          this.GetText = function()
          {
            return document.getElementById('TextArea1').value;
          }
          
          this.SetText = function(newValue)
          {
            document.getElementById('TextArea1').value = "Spell checked: " + newValue;
          }
      }
     
      function spellCheck()
      {			
	      var RadSpell1 = GetRadSpell('<%= RadSpell1.ClientID %>');

	      RadSpell1.SetTextSource(new MyTextSource());
	      RadSpell1.StartSpellCheck();
      }      
                      
    //-->
  </script>

  <form id="form1" runat="server">
    <div>
      <radS:RadSpell ID="RadSpell1" runat="server" ButtonType="None"></radS:RadSpell>
      <textarea id="TextArea1" cols="40" rows="5">Thsi iis mispeld</textarea>
      <br />
      <button onclick="spellCheck();" class="Button">Spell Check</button>
</form>
</body>
</html>
