Welcome to Webhost4life Forum Sign in | Join | Faq

ASP.NET C#

Started by systemspoorna at 04-25-2008 12:13 AM. Topic has 2 replies.

Print Search
Sort Posts:    
   04-25-2008, 12:13 AM
systemspoorna is not online. Last active: 4/25/2008 3:11:46 PM systemspoorna

Not Ranked
Joined on 04-25-2008
Posts 1
image control
Reply Quote

Please Help Me.....

Using Asp.net and C# 

i am selecting an image from the system using File Upload, and after clicking on upload button that

image must disply on Image control, after clicking on save button that image must be store in database.

In Edit mode i want to display that image into the image control.

 


   Report 
   06-09-2008, 7:16 PM
Clark Cooper is not online. Last active: 6/8/2008 9:47:50 AM Clark Cooper

Top 50 Posts
Joined on 06-08-2008
Posts 6
Re: image control
Reply Quote
I'm not sure I understand "selecting an image from the system".  Let me see if I understand.  Are you trying to:

1.  Allow a user to upload an image
2.  Show him the image (in an image control) and ask for confirmation before permanently saving the image to your server.
3.  Finally save the image to the server.  Are you trying to save the image to an images directory, or actually save the image to your database?

If these are the steps you are trying to make happen, you might try saving the image to a temporary folder and then:

MyImageControl.ImageUrl = MyTemporaryImagePath
//also save MyTemporaryImagePath to the StateBag or other temporary string

Then, when the user confirms that the image is correct, you can copy your temp image to a permanent folder and save the permanent path string to your database (personally, I wouldn't save the actual image to your database).

   Report 
   06-10-2008, 12:27 AM
Milo is not online. Last active: 6/10/2008 3:24:29 PM Milo

Top 75 Posts
Joined on 06-10-2008
Posts 4
Re: image control
Reply Quote
I second the idea to save to your DB, I know it might seem tidier, but you'll never want to search the binary data(blob), and it will just bloat out your DB.

Save the existance of the image in the data, with meaning full context like, "filename", "keywords" etc, but keep the image in your website. Websites are for file storage, databases are for data ( to be cross referenced and searched)

just my 2 pence.
   Report 
Webhost4life Fo... » General Discuss... » ASP.NET C# » Re: image control

Powered by Community Server, by Telligent Systems