且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用存储过程将表单数据和图像插入数据库

更新时间:2023-01-03 16:31:32

Try replacing:
Try replacing:
cmdins.Parameters.AddWithValue("@Property_Image", FileUpload1.PostedFile);

with

cmdins.Parameters.AddWithValue("@Property_Image", FileUpload1.FileBytes);


Thanks for the help but i solved it..
just modified this line
cmdins.Parameters.AddWithValue("@Property_Image", FileUpload1.PostedFile);

cmdins.Parameters.AddWithValue("@Property_Image", imagebytes);
Thanks for the help but i solved it..
just modified this line
cmdins.Parameters.AddWithValue("@Property_Image", FileUpload1.PostedFile);
with
cmdins.Parameters.AddWithValue("@Property_Image", imagebytes);