-----------------------------------------------------------
New Message on MumbaiUserGroup
-----------------------------------------------------------
From: atrehan
Message 4 in Discussion
Hey , I am sorry i didn't look at that part. That can also be done what u can
do is something like this 'This is the Image tag that u will place on ur page
'Here imageId is the varibale by which you will identify your image in the
database <img border="0" src="<%# GetImage(ImageID) %> id="img"> 'This is the
function that you have to write on the page where you want to show the image
Public Function GetImage(ByVal id As Integer) As String
Return "showImage.aspx?id=" & id.ToString
End Function And on the page ShowImage.aspx you can write the code that we
discussed last time 'This is the funtion that gets the image stored in the
database
'Obj is my custom object
'ds is the dataset
ds = obj.getImage(imgID)
'Here we check the dataset for Data
If ds.Tables(0).Rows.Count > 0 Then
If Not (ds.Tables(0).Rows(0)("FieldName") Is DBNull.Value) Then
'We set the content type of the page
Response.ContentType = "Image/Jpeg"
'We write the image on the page
Response.BinaryWrite(CType(ds.Tables(0).Rows(0)("FieldNAme"), Byte()))
End If
End If
Basically you are calling another page as the source for your image and that
page gets the image from the database and writes it for you.
Thanks,
Amit Trehan
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/mumbaiusergroup/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]