Can I use images in a class?

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
 
S

sloan

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.

...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top