You'd think it would work, but it doesn't. The trick is sort of a hack, but it works....
Create an aspx page that has nothing on it, call it GetImage.aspx. In the page_load do somthing like this to write your image to the output stream of the aspx page. This load the picture from a column in a DB, but you can generate it anyway you want. byte[] b = (byte[]) dr["picture"]; ImageFormat f = ImageFormat.Gif; Bitmap img = new Bitmap(new MemoryStream(b)); img.Save(Response.OutputStream, f); Then simply set your image source to GetImage.aspx. You can pass the GetImage page parameters or use session or Context.Items to pass the necessary parameters. On 8/9/05, Steve Parrish <[EMAIL PROTECTED]> wrote: > I want to do this: > <img src="<%myImageGenerator.getImage%>"> > > myImageGenerator.getImage returns a System.Drawing.Image. > > Instead of the image, I see the code for the image. I've tried > everything I can think of. > > What's the trick? > > Thanks, > > Steve > > > Instead of an image, > -- > <mailto:[EMAIL PROTECTED]> > > > > > > Yahoo! Groups Links > > > > > > > -- Dean Fiala Very Practical Software, Inc http://www.vpsw.com ------------------------ Yahoo! Groups Sponsor --------------------~--> <font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12hqtkq9i/M=362131.6882499.7825260.1510227/D=groups/S=1705006764:TM/Y=YAHOO/EXP=1123650019/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org ">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life - brought to you by One Economy</a>.</font> --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
