Hello, I have sucessfully upload and store my image to my database, but somehow I cannot view the image. I have store the image under a column with varbinary(MAX). This is my code:
<tr>
<td class="td1"><div align="right"><span>Thumbnail: </span></div></td>
<td class="style1"> </td>
<td class="td1"><div align="left"><span>
<asp:FileUpload ID="FileUpload1" runat="server" />
</span></div></td>
</tr>
protected void Button2_Click(object sender, EventArgs e)
{
string SqlString = "Insert Into newsevent2 (Image) Values (@Image)";
byte[] binaryImage = FileUpload1.FileBytes;
using (con = new SqlConnection(connString))
{
using (cmd = new SqlCommand(SqlString, con))
{
cmd.CommandType = CommandType.Text;
...
Go to the complete details ...