Ajax Editor control in VB.NET

Editor Control allow that we easily create HTML Content via button in toolbar.
  • 3117

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.

Step : 2 Go to Solution Explorer and right click.

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

Step : 3  Drag and Drop control in toolbar.

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

Code :  
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
        <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>

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.

Step : 6
 We write a hi mcn and click in ok button.



More Articles

© 2020 DotNetHeaven. All rights reserved.