image in textbox

Hi


I had paste a image in my textbox.. and worked fine.. the problem is that i cant get it from there.. i want to store all the content of the textbox in SQL Db so .. i need its content including image..

txtBox1.Text wont work.. i lose the image... does anybody knowes hwo to do that


Cheers!



Answer this question

image in textbox

  • carabasha

    Hi!

    Paste image into TextBox May be you mean RichTextBox RichTextBox has RTF property so you can save all formatting or it have SaveFile() method so you can save all into stream and write this stream as BLOB to SQL.


  • Grace Cheng

    yes yes.. you are perfectly .. right!!!

    but then gow will i use the Text proprety to set the text from the stream i saved it




  • gearboxpc

    Thanks!!

  • CanUHelpMe

    I forgot to mention that there is also ReadFile() method that can load document back from stream. So basically you simply save/load RTF document to/from stream and store stream inside SQL BLOB column.


  • image in textbox