List Info

Thread: RE: Error displaying images in gridview




RE: Error displaying images in gridview
country flaguser name
United States
2008-04-18 07:16:24
Rafeeq, this is old ADO.  I think Dipak wants ADO.Net.

> Date: Fri, 18 Apr 2008 13:06:43 +0530
> From: kpmrafeeqgmail.com
> Subject: [aspnet-databases] RE: Error displaying images in gridview
> To: aspnet-databasesaspadvice.com
>
> Hi Dipak,
>;
> Try below method.
>
> str = "SELECT image FROM album where id =" & ID
> rs.Open str, conn
> if rs.eof then 'No records found
> Response.End
> else 'Display the contents
> Response.ContentType = "image/gif"
> Response.BinaryWrite(rs("image"))
> end if
>
> You can use red highlighted code in the grid, if you are using extended
> grid.
>
> As you are storing it as binary format. you need to reload it in binary,
> try.. this
>
> Happy coding,
> --
> With Warm Regards,
>
> >Rafeeq
> >Keralam
>
>
>
>
> On Fri, Apr 18, 2008 at 12:51 PM, dipak mishra <mishradipakgmail.com&gt;
> wrote:
>;
> > Dear Allen,
>; > I am storing Image itself in database not the path to it.
> > How to display that using image field.
>; > I am not able to do so.
> > Plz Help
> >
> > On 4/18/08, Allen Moon <howlmoonclearwire.net> wrote:
>; > > Hey there
> > > In ASP 2.0 there is a ImageField in gridview that you need to use.
> > >
> > > -----Original Message-----
> > > From: dipak mishra [mailto:mishradipakgmail.com]
> > > Sent: Thursday, April 17, 2008 1:15 PM
> > > To: aspnet-databasesaspadvice.com
> > > Cc: aspnet-databasesaspadvice.com
> > > Subject: [aspnet-databases] Error displaying images in gridview
&gt; > >
> > > Hi All,
> > > I am facing a problem on which i would like to have suggestions.
> > > I have an ERP Application in ASP.net 2.0 with sql 2005 as back end. I am
> > > storing images in database then i am displaying it on a page and giving
>; > the
> > > URL of that page in grid view template field which has a image control.
&gt; > > Same thins i have been doing in application developed in asp 1.0 and sql
> > 7.0
> > > the images are displayed correctly everywhere.
> > > But in this application in Grid view the same image have stopped being
> > > displayed. Although if i view them individually on other page they are
> > > displayed correctly.
> > > The client has genuine sql server.with service pack 2. Same things are
> > > working fine on my development machine and similar thing is running fine
> > in
> > > asp 1.0 and sql 7.0.
> > > It was running fine on this clients system too. All of a sudden this is
> > not
> > > displaying image in grid view.
> > > I have reinstalled sql2005 still same problem.
&gt; > > The images are saved in sql 2005 this i have checked also the images are
> > > displayed correctly individually which proves images are in fact saved
> > > actually.
> > > Any help will be graetly appreciated since i am stuck
> > > Regards
&gt; > > Dipak
> > >
> > >
> > >
> > > Need SQL Advice? http://sqladvice.com
> > > Need RegEx Advice? http://regexadvice.com
> > > Need XML Advice? http://xmladvice.com
> > >
> > >
> > >
> > >
> > > Need SQL Advice? http://sqladvice.com
> > > Need RegEx Advice? http://regexadvice.com
> > > Need XML Advice? http://xmladvice.com
> > >
> > >
> > >
> > >
> > > Need SQL Advice? http://sqladvice.com
> > > Need RegEx Advice? http://regexadvice.com
> > > Need XML Advice? http://xmladvice.com
> > >
> > >
> > >
> > > Need SQL Advice? http://sqladvice.com
> > > Need RegEx Advice? http://regexadvice.com
> > > Need XML Advice? http://xmladvice.com
> > >
> > >
> > >
> > > Need SQL Advice? http://sqladvice.com
> > > Need RegEx Advice? http://regexadvice.com
> > > Need XML Advice? http://xmladvice.com
> > >
> >
> > Need SQL Advice? http://sqladvice.com
> > Need RegEx Advice? http://regexadvice.com
> > Need XML Advice? http://xmladvice.com
> >
>
>
>
> Need SQL Advice? http://sqladvice.com
> Need RegEx Advice? http://regexadvice.com
> Need XML Advice? http://xmladvice.com


Pack up or back up–use SkyDrive to transfer files or keep extra copies. Learn how. Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )