I have a sql server database that returns a byte for an image. If I use the tableadapter wizard and install it in my stored procedure and preview data, it discards the image. It automatically turns it into an image in the preview data. I donβt see threads of ints or anything else in it.
How can I display it on my asp.net webpage using gridview and objectdatasource?
I searched and foudn where the image field may point to a URL on another page that performs byte conversion, but I'm not sure if this is better. I found another way to create a temporary file.
Just trying to see the best way to do this.
edit - I try not to use a temporary file. If I cannot use gridview, the regular image field is fine.
asp.net 2.0, C #.
Thanks for any help.
change
ended:
protected void Page_Load(object sender, EventArgs e) { string id = Request["id"]; string connstr = "DSN=myserver"; OdbcConnection conn = new OdbcConnection(connstr); OdbcCommand cmd = new OdbcCommand("{call mySP (?)}", conn); cmd.CommandType = CommandType.StoredProcedure;
and this is on the calling page:
<asp:Image ID="Image1" ImageAlign="Middle" ImageUrl="show.aspx?id=123" Runat="server" />
johnny Mar 04 '09 at 20:44 2009-03-04 20:44
source share