Hello...

Lacking a few informations, I'll make a few guesses as to where you're
stuck.
By "Webform", I assume you're using ASP.NET.
Next, I assume you can retrieve your binary file from the database...

Then, when trying to send the file to the client, you have to specify
a few items in the Response... Something like

HttpContext.Current.Response.ContentType = "application/octet-stream"
'sending a file in binary format
Response.AddHeader("Content-Disposition", "attachment; filename=" &
filename) 'filename is quite explicit
HttpContext.Current.Response.BinaryWrite(bar) 'bar is the binary array
you load from your sql database

I hope useful to you...

gagandeep sharma a écrit :
> hi guys, pls help me
>
> in a web form, i've a file upload control, with th help of it, any user can
> upload any type of document ( like, pdf, zip,excel, images, word document
> etc ),, when he/she upload that very attachment or when he/she click on
> upload button, an event fire in which i stored that information/attachment
> in sql server 2000 database in image datatype...
>
> in a web form, there is no any kind of checks, which determine what kind of
> extensions attachment holds...
>
> i'm just concerned about attachment, in a click event, i just convert the
> attachment into binary format and stored it into database....
>
>
> now my problem is:-
>
> how can i read back the attachment...
>
> suppose i created another webform in which those information display which
> holds attachment,, so how can i read back that very attcahment when i click
> on button named ad  "read attchment"
>
> my problem is, when i click on read attachment button, a new application
> open ( like-- when some online application form see, there is a download
> button , when online user click on download button, a new application
> open,,example, if download attachemnt in pdf, then pdf application open, if
> download application in ppt, then powerpoint application open,,,,) same i
> want , but i'm failed to do it,,
>
> so if any1 know it, pls share with me,,,
> thanks
>
>
>
>
>
>
>
> --
> GO and LEAD from Whereever You are.
> Think Big and Think Fast.

Reply via email to