I basicly know how to pull a image down with using Image source in HTML. By
telling image src what file name to open. But if I have the file path stored
in a SQL database. such as c:/mypictures/myimagefile.gif, how would I call
that back up, to show that file with out typing the path in my code. Can I
just refrence the sql server, and read that file path? What would be the
correct way of writing that in my code. Or am I totally off base, and do
this an entirely diffrent way.
TIA!!!
RudyYou'll have to write code to pull the image form your database then write
it to the Response.OutputStream. I have a sample app that should get you
started:
http://staff.develop.com/ballen/blo...f8-9aff48bf2481
-Brock
DevelopMentor
http://staff.develop.com/ballen
> Hello all!
> I basicly know how to pull a image down with using Image source in
> HTML. By telling image src what file name to open. But if I have the
> file path stored in a SQL database. such as
> c:/mypictures/myimagefile.gif, how would I call that back up, to show
> that file with out typing the path in my code. Can I just refrence
> the sql server, and read that file path? What would be the correct
> way of writing that in my code. Or am I totally off base, and do this
> an entirely diffrent way.
> TIA!!!
> Rudy
This article explains in detail how to pull files from a database and
display them dynamically to the user:
http://steveorr.net/articles/EasyUploads.aspx
This one explains how to generate images dynamically and display them to the
user:
http://steveorr.net/articles/ImproveYourImages.aspx
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Rudy" <Rudy@.discussions.microsoft.com> wrote in message
news:B76F371F-B5A7-42F4-BCAD-56FF560D8A99@.microsoft.com...
> Hello all!
> I basicly know how to pull a image down with using Image source in HTML.
> By
> telling image src what file name to open. But if I have the file path
> stored
> in a SQL database. such as c:/mypictures/myimagefile.gif, how would I call
> that back up, to show that file with out typing the path in my code. Can
> I
> just refrence the sql server, and read that file path? What would be the
> correct way of writing that in my code. Or am I totally off base, and do
> this an entirely diffrent way.
> TIA!!!
> Rudy
Hi Brock and Steve,
Thank you for the advise. I'll try it out tonite. I just want to make sure
I'm clear, I am not storing the image in the SQL db, just the filepath. Will
this still work?
Thanks for your help!!!!
"Steve C. Orr [MVP, MCSD]" wrote:
> This article explains in detail how to pull files from a database and
> display them dynamically to the user:
> http://steveorr.net/articles/EasyUploads.aspx
> This one explains how to generate images dynamically and display them to the
> user:
> http://steveorr.net/articles/ImproveYourImages.aspx
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://SteveOrr.net
>
> "Rudy" <Rudy@.discussions.microsoft.com> wrote in message
> news:B76F371F-B5A7-42F4-BCAD-56FF560D8A99@.microsoft.com...
> > Hello all!
> > I basicly know how to pull a image down with using Image source in HTML.
> > By
> > telling image src what file name to open. But if I have the file path
> > stored
> > in a SQL database. such as c:/mypictures/myimagefile.gif, how would I call
> > that back up, to show that file with out typing the path in my code. Can
> > I
> > just refrence the sql server, and read that file path? What would be the
> > correct way of writing that in my code. Or am I totally off base, and do
> > this an entirely diffrent way.
> > TIA!!!
> > Rudy
>
It should be roughly similar.
The main difference would be that (instead of grabbing the bytes from a
database field) you'll probably be using Response.WriteFile.
Here's more info on Response.WriteFile
http://msdn.microsoft.com/library/d...tefiletopic.asp
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Rudy" <Rudy@.discussions.microsoft.com> wrote in message
news:B91B851D-4A86-4A35-A6C2-F43ACC83E0A9@.microsoft.com...
> Hi Brock and Steve,
> Thank you for the advise. I'll try it out tonite. I just want to make
> sure
> I'm clear, I am not storing the image in the SQL db, just the filepath.
> Will
> this still work?
> Thanks for your help!!!!
> "Steve C. Orr [MVP, MCSD]" wrote:
>> This article explains in detail how to pull files from a database and
>> display them dynamically to the user:
>> http://steveorr.net/articles/EasyUploads.aspx
>>
>> This one explains how to generate images dynamically and display them to
>> the
>> user:
>> http://steveorr.net/articles/ImproveYourImages.aspx
>>
>> --
>> I hope this helps,
>> Steve C. Orr, MCSD, MVP
>> http://SteveOrr.net
>>
>>
>> "Rudy" <Rudy@.discussions.microsoft.com> wrote in message
>> news:B76F371F-B5A7-42F4-BCAD-56FF560D8A99@.microsoft.com...
>> > Hello all!
>>> > I basicly know how to pull a image down with using Image source in
>> > HTML.
>> > By
>> > telling image src what file name to open. But if I have the file path
>> > stored
>> > in a SQL database. such as c:/mypictures/myimagefile.gif, how would I
>> > call
>> > that back up, to show that file with out typing the path in my code.
>> > Can
>> > I
>> > just refrence the sql server, and read that file path? What would be
>> > the
>> > correct way of writing that in my code. Or am I totally off base, and
>> > do
>> > this an entirely diffrent way.
>>> > TIA!!!
>>> > Rudy
>>
>>
>
0 comments:
Post a Comment