开发者

save image file using SqlDataSource

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜