ARTICLE

Editor control in Ajax

Posted by Davin Martyn Articles | ASP.NET AJAX in VB.NET September 21, 2011
Editor Control allow that we easily create HTML Content via button in toolbar.
 
Reader Level:

Introduction : Editor control is ASP.NET Ajax Control that allow we easily create and edit HTML content via Button in toolbar.

The Editor Control include option for change font size, selecting font, changing background, adding image, change color, paste operation and add links.

Step : 1 Open Visual Studio and go to File menu option.

  • Select Web Site option.
  • Select ASP.NET Web Site.
  • Default.aspx page open.
ASP-page1.gif

Step : 2 Go to Solution Explorer and right click.

  • Selct Add New Item option.
  • Select Web Form .
webforms.gif

Step : 3  Drag and Drop control in toolbar.

  • Select Button, Editor, ScriptManager Control, Label.
  • Write a code.

Code :  
<title></title>
</head>
<
body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
        <cc1:Editor ID="Editor1" runat="server" Width = "220px" /><br /><br />
        <asp:Button ID="Button1" runat="server" Text="ok" /><br /><br />
 <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
    </div>
 </form
>

Step : 4 Go to design option and double click in ok button.

  • Write a code.

Code :
 Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
        Label1.Text = Editor1.Content
    End
Sub

Step : 5  Press F5  and run.

Editor-control.gif
Step : 6
 We write a hi mcn and click in ok button.

editor-run.gif

Login to add your contents and source code to this article
share this article :
post comment
 
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor
PREMIUM SPONSORS
  • The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
    The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
Team Foundation Server Hosting
Become a Sponsor