| | |
Image Uploading using c#.net + asp.net
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: May 2008
Posts: 17
Reputation:
Solved Threads: 0
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
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
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.
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
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;
}
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
![]() |
Similar Threads
- uploading Images into Database (ASP.NET)
- check for images duplication (ASP.NET)
Other Threads in the C# Forum
- Previous Thread: WPF Expander
- Next Thread: How to : calcualte the Statistical Operations in C# !
| Thread Tools | Search this Thread |
.net access ado.net algorithm array barchart bitmap box broadcast buttons c# check checkbox client color combobox control conversion csharp custom data database datagrid datagridview dataset datetime degrees development draganddrop drawing encryption enum event excel file finalyearproject form format forms function gdi+ getoutlookcontactusinfcsvfile globalization httpwebrequest image index input install installer java label list listbox mandelbrot math mono mouseclick mysql operator panel path photoshop picturebox pixelinversion post programming radians regex remote remoting richtextbox serialization server silverlight sleep socket sql sql-server statistics stream string table text textbox thread time timer timespan update upload usercontrol users validate validation visualstudio webbrowser windows winforms wpf xml





