Spell - Dynamic Creation

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

This example demonstrates creating a RadSpell instance dynamically in the code-behind, and attaching it to a control.

Note that we work with control ID's, and they are setup by ASP.NET after we add the control to the form's Controls collection.

This is especially important when IsClientID is true and you are attaching to the ClientID of a control.

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="Telerik.Web.Examples.Spell.DynamicCreation.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>
    <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">
        <asp:PlaceHolder ID="contentsHolder" runat="server"></asp:PlaceHolder>

Find Assistance

Help Us Improve

Was this example helpful?