开发者

save image file using SqlDataSource

开发者 https://www.devze.com 2023-03-16 23:11 出处:网络
How to pass byte array as update parameter in SqlDataSou开发者_StackOverflowrce control? Stream fs = FileUpload1.PostedFile.InputStream;

How to pass byte array as update parameter in SqlDataSou开发者_StackOverflowrce control?

Stream fs = FileUpload1.PostedFile.InputStream;
BinaryReader br = new BinaryReader(fs);
Byte[] bytes = br.ReadBytes((Int32)fs.Length);


You can pass the value as you do with normal parameter value, however you have to Set Type="Object"

<UpdateParameters>
      <asp:Parameter Name="" Type="Object" />
</UpdateParameters>
0

精彩评论

暂无评论...
验证码 换一张
取 消