try { string n = ""; n = ((yzPicture)((Button)sender).Tag).picId.ToString().Trim(); string constring = ConfigurationManager.AppSettings["DMGYayinPicConStr"]; SqlConnection conDB = new SqlConnection(constring); SqlCommand cmd = new SqlCommand("[dbo].[sp_PreviewPicture]", conDB); cmd.CommandType = CommandType.StoredProcedure; SqlParameter paramId = new SqlParameter(); paramId.ParameterName = "@id"; paramId.Value = Convert.ToInt32(n); cmd.Parameters.Add(paramId); SqlParameter paramType = new SqlParameter(); paramType.ParameterName = "@type"; paramType.Value = 2; cmd.Parameters.Add(paramType); conDB.Open(); SqlDataAdapter da = new SqlDataAdapter(cmd); SqlCommandBuilder cbd = new SqlCommandBuilder(da); DataSet ds = new DataSet(); da.Fill(ds); conDB.Close(); byte[] imgbt = (byte[])(ds.Tables[0].Rows[0]["preview"]); MemoryStream ms = new MemoryStream(imgbt); Clipboard.SetImage(Image.FromStream(ms)); this.txtEditor.Paste();//this is my c1editor... the problem is it does not support images i guess. }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)