Image Uploading using c#.net + asp.net

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: May 2008
Posts: 17
Reputation: sireesha.c is an unknown quantity at this point 
Solved Threads: 0
sireesha.c sireesha.c is offline Offline
Newbie Poster

Image Uploading using c#.net + asp.net

 
0
  #1
Jul 11th, 2008
Hi all,
Can u plz tell me as how to upload images.
I am developing an web application similar to picasaweb album.
I need to know as where the images to be saved(is it in database directly each image or just image path in database and files in application folder)

Can u plz provide me the database structure (if any ) similar to my application.

Expecting replyASAP
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 1
Reputation: tuhin.bd is an unknown quantity at this point 
Solved Threads: 0
tuhin.bd's Avatar
tuhin.bd tuhin.bd is offline Offline
Newbie Poster

Re: Image Uploading using c#.net + asp.net

 
0
  #2
May 5th, 2009
don't used to save images in database. because it will load your database server. so you can use image storage path in database server to view the image in your ASP.net page.
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 29
Reputation: brainbox is an unknown quantity at this point 
Solved Threads: 1
brainbox's Avatar
brainbox brainbox is offline Offline
Light Poster

Re: Image Uploading using c#.net + asp.net

 
0
  #3
May 5th, 2009
Hi

From your post on C# forum i believe you want to know how to upload files in C#. I agree with tuhin.bd that you should store filepath of the image rather than the image itself.

Therefore to save a filepath of the selected image, you will first get the filepath of the image by the following code, which can be either behind a command button or however you want to invoke.

OpenFileDialog opfd = new OpenFileDialog();
opfd.Filter = "Your extension here (*.EXT)|*.ext|All Files (*.*)|*.*";
opfd.FilterIndex = 1;


if (opfd.ShowDialog() == DialogResult.OK)
{
filepath = opfd.FileName;
}
This filepath can then be stored in your database which can be of text type in microsoft access for example.
Make sure that the directory path at your host matches the path saved.
Hope this helps, if you would like to know about retrieval of images from database in c#, please let me know.
I dont know much about asp so i hope somebody else posts saving and retrieving in asp
Regards
Sarah
Sarah Akhtar
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C# Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC