Can I use images in a class?

  • Thread starter Thread starter Miguel Dias Moura
  • Start date Start date
M

Miguel Dias Moura

Hello,

I am using the profile in Asp.Net 2.0 to save complex types, i.e., a
class.
I am using an SQL 2005 database as my profile provider.

Can I use a file or image in a class and save it in my profile?
Should I do this?

Public Class Document

Private _image As Image

Public Property Image() As Image
Get
Return _image
End Get
Set(ByVal value As String)
If _image = value Then
Return
End If
_image = value
End Set
End Property

End Class

To be honest I have no idea if this would place the image file into the
SQL 2005 database as part of the profile of a specific user.

Instead, should I place the image/file in a folder and save its url in
the SQL database?

Could someone, please, help me out with this?

Thank You,
Miguel
 
The general of thumb is to save the url to the image in the database.

Now, with 2.0 and the image control that takes a byte stream, that may alter
slightly.

However, I still think, that for images that don't need super security, the
url is the better method.

...

However, if you wrote an app for a bank, where you could view check images,
then you would want to send that across as a byte stream, and store the
image in the db that way.

Just my opinion.

...
 
Back
Top