Re: display images without having them on the disk?

From: Kevin Spencer (kevin_at_takempis.com)
Date: 02/25/04


Date: Wed, 25 Feb 2004 15:05:39 -0500


<img src="ImageMaker.aspx">

-- 
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"Yoramo" <yoramo@[NOSPAM]hotmail.com> wrote in message
news:etKOln9#DHA.1732@TK2MSFTNGP12.phx.gbl...
> Hello Kevin
>
> How does it know to place the image in a specific IMG tag or a Image
button?
>
> yoramo
>
> "Kevin Spencer" <kevin@takempis.com> wrote in message
> news:u2vIMv7%23DHA.2072@TK2MSFTNGP11.phx.gbl...
> > He already did. There is no Template HTML. It simply sends an image. You
> > include a reference to that page as the URL for an image tag in another
> > page.
> >
> > -- 
> > HTH,
> > Kevin Spencer
> > .Net Developer
> > Microsoft MVP
> > Big things are made up
> > of lots of little things.
> >
> > "Yoramo" <yoramo@[NOSPAM]hotmail.com> wrote in message
> > news:#8fDPEx#DHA.2524@TK2MSFTNGP10.phx.gbl...
> > > hello
> > >
> > >     Thanks for your replay.
> > >     can you show me how whould the aspx file look like for such a code
> to
> > > work?
> > >
> > > Yoramo.
> > >
> > >
> > > "white sheng" <whitesheng@untsoft.com.cn> wrote in message
> > > news:ec0hGnq%23DHA.340@tk2msftngp13.phx.gbl...
> > > > hi,you can do it just like the following example.
> > > >
> > > > private void Page_Load(object sender, System.EventArgs e)
> > > > {
> > > >     SqlConnection mycon = new SqlConnection("your connection
string");
> > > >     mycon.Open();
> > > >
> > > >     int liid = int.Parse(Request.QueryString["id"]);
> > > >     string sqlText = "SELECT img_name, img_data, img_contenttype
FROM
> > > image1
> > > > where id="+liid;
> > > >     SqlCommand MyCommand = new SqlCommand (sqlText, mycon);
> > > >     SqlDataReader dr =MyCommand.ExecuteReader();
> > > >     if(dr.Read())
> > > >     {
> > > >         Response.ContentType = (dr["img_contenttype"].ToString());
> > > >         Response.BinaryWrite((byte[])dr["img_data"]);
> > > >     }
> > > >     mycon.Close();
> > > > }
> > > >
> > > >
> > >
> > >
> >
> >
>
>