hi, please i am using the cold below to show a varbinary image in a binaryimage but its not showing.
<telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" DataValue='<%#Eval("Front_Image") %>' AutoAdjustImageControlSize="false" Height="355px" Width="700px" ToolTip="Front Image" AlternateText='<%#Eval("Front_Image", "Photo of {0}") %>' > </telerik:RadBinaryImage> <asp:SqlDataSource ID="SqlDataSourceImage" runat="server" ConnectionString="<%$ ConnectionStrings:ChequeViewConnectionString %>" SelectCommand="SELECT Front_Image FROM [Transactions]"></asp:SqlDataSource>
below is also the code used in saving the image
System.IO.FileStream fs = new System.IO.FileStream(filepath, System.IO.FileMode.Open);
byte[] imageAsBytes = new byte[fs.Length];
fs.Read(imageAsBytes, 0, imageAsBytes.Length);
fs.Close();
SqlConnection conn = new SqlConnection(strconnection);
conn.Open();
SqlCommand cmd = new SqlCommand("INSERT INTO Transactions(Front_Image) VALUES (@Front_Image)", conn);
cmd.Parameters.AddWithValue("@Front_Image", imageAsBytes);
cmd.ExecuteNonQuery();
conn.Close();
any help as to what is wrong.
thanks