hi,
i have a rich text box in my application and a save button.Can anyone tell me how to send that text from rich text box to database .Thanks

You can do it like this:

SqlCommand cmd = new SqlCommand("INSERT INTO table (richTxt) VALUES('" + richTextBox1.Text + "')");

cmd.ExecuteNonQuery();

Thanks

thanks .One more question, do u know how to include picture or image in rich text box and when u click on the image it should take u to paint.
Thanks alot for help

i know how to add image but how can i open paint when i click on it.Thanks

Save the image somewhere and then use Process.Start() to open Paint.

Here's an example:

string imagePath = @"C:\image.jpg";

// This will open the image in Paint
System.Diagnostics.Process.Start("mspaint", imagePath");

Thanks

[double post]

Thanks a lot that works.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.