RichTextbox Example or Sample in ASP.NET

Add DLL free Richtextbox download available dll here FreeTextbox . After download dll from that site create one new website in visual studio and add FreeTextbox http://www.freetextbox.com/ dll reference to newly created website after that design aspx page like this:
  1. <%@ Register Assembly="FreeTextBox" Namespace="FreeTextBoxControls" TagPrefix="FTB" %>  
  2.     <html xmlns="http://www.golivecode.com/xhtml">  
  3.   
  4.     <head runat="server">  
  5.         <title>Richtextbox Make BY Pintoo</title>  
  6.         <script type="text/javascript">  
  7.             function validate() {  
  8.                 var doc = document.getElementById('Richtextbox');  
  9.                 if (doc.value.length == 0) {  
  10.                     alert('Please Enter data in Richtextbox');  
  11.                     return false;  
  12.                 }  
  13.             }  
  14.         </script>  
  15.     </head>  
  16.   
  17.     <body>  
  18.         <form id="form1" runat="server">  
  19.             <div>  
  20.                 <table>  
  21.                     <tr>  
  22.                         <td>  
  23.                             <FTB:FreeTextBox ID="Richtextbox" runat="server">  
  24.                             </FTB:FreeTextBox>  
  25.                         </td>  
  26.                         <td valign="top">  
  27.                             <asp:GridView runat="server" ID="gvdetails" AutoGenerateColumns="false">  
  28.                                 <Columns>  
  29.                                     <asp:TemplateField HeaderText="RichtextBoxData">  
  30.                                         <ItemTemplate>  
  31.                                             <asp:Label ID="lbltxt" runat="server" Text='<%#Bind("RichtextData") %>' />  
  32.                                         </ItemTemplate>  
  33.                                     </asp:TemplateField>  
  34.                                 </Columns>  
  35.                             </asp:GridView>  
  36.                         </td>  
  37.                     </tr>  
  38.                 </table>  
  39.             </div>  
  40.             <asp:Button ID="btnSave" runat="server" OnClientClick="return validate()" Text="Submit" onclick="btnSave_Click" />  
  41.             <br />  
  42.             <asp:Label ID="lbltxt" runat="server" />  
  43.         </form>  
  44.     </body>  
  45.   
  46.     </html>  
After that run your application richtextbox appears like this:
  1. SqlConnection con = new SqlConnection("Data Source=golivecode;Integrated Security=true;Initial Catalog=TExt3");  
  2. protected void Page_Load(object sender, EventArgs e) {  
  3.     if (!IsPostBack) {  
  4.         BindGridview();  
  5.     }  
  6. }  
  7. protected void BindGridview() {  
  8.     con.Open();  
  9.     SqlCommand cmd = new SqlCommand("select data from TextBoxData", con);  
  10.     SqlDataAdapter da = new SqlDataAdapter(cmd);  
  11.     DataSet ds = new DataSet();  
  12.     da.Fill(ds);  
  13.     gvdetails.DataSource = ds;  
  14.     gvdetails.DataBind();  
  15. }  
  16. protected void btnSubmit_Click(object sender, EventArgs e) {  
  17.         con.Open();  
  18.         SqlCommand cmd = new SqlCommand("insert into data(data) values(@data)", con);  
  19.         cmd.Parameters.AddWithValue("@data", Rich.Text);  
  20.         cmd.ExecuteNonQuery();  
  21.         con.Close();  
  22.         RichTextBox1.Text = "";  
  23.         BindGridview();  
  24. }