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.
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

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.