Multiple image upload with asp.net - asp.net

How to upload multiple images to the web server with single button.I know there are couple of options available like flash,j query and silverlight.The problem is that there are many others things I want to do with images like upload the same image with different size (thumbnail) and want to change the image file name something like a GUID and want to store the path in database.

You can use uploadify.js for the same.
It is light weight as it contains jquery code.
Easy to implement.
Here is the link for the same. Uploadify

Related

Compress Image automatically using a prefixed link

I am starting to develop a mobile application and have some issues with the images.
In fact I am transforming an existing website to a mobile app, so I am using the existing database with the existing pictures too.
The problem is that the images have a really good quality (5MB each) and I have more than 100 images to include on the app.
Is there any website who can transform the image online and give a link.
For example the image is here
http://myWebSite.com/img1.jpeg
I want a website like that
http://compressWebSite/myWebSite.com/img1.jpeg
PS : I don't have access to the website server to optimise the images. I have only access to the link of each image from the database.
Based on what you say, your requirements are
Only have URL of the images
Want to send the URL of the images to a service to compress the size down (with similar image quality)
Reference just the compressed image URL
If thats the case, you can refer to TinyPNG or Kraken.io services

optimize and best practice for image call each time

I have client code for large project, their logo is on master page, which he updates weekly.
I have to update the title, image path, etc. on all the server and also upload a new image on all servers, now he wants to automate this process.
What is the best way to accomplish this? I have thought about storing the information (including Image) in database with single record and each time client update this single record when they want. But on each page, the logo image will come from database. Is it ok or should we cache or some other option to reduce load each time? Can we update page(.aspx) file using filestream like we can update text file? because if I update aspx from code then we don't have call any SQL, just upload an image, update the title and other information in aspx page.
Very simple. If the client wants to update something on their own without requiring developer intervention, it needs to go in the database. You can of course add any caching or whatever you like so that it's not necessary to query the database each request.
The only other viable alternative would be giving the client access to the directory that has the logo and insist on a convention for the logo filename. The client can then simply upload a new logo with the same filename and nothing needs to change on the site.
Making changes to the page itself automatically is a hugely bad idea. Avoid that like the plague.
I suppose a final though not bloody likely option is to get the client to realize that a logo shouldn't freaking be changed weekly or even yearly. It's a freaking logo; it's your identifying mark to the public.

FormView Image control

Hi i am currently working in Asp.net using C# language.
Please any one tell me how to show picture that are stored server table(data type image) in asp:image control.
thanks.
You'll have to save the image in some folder on your website, and use a URL to link to that image. Since this is going to be done for every request, I'm guessing you can understand this is not a best practice.
The correct way to do this is save all images in a single directory on your website, and in the DB only store the URL for that image.

Web Application and Development

i have two pages:
1st page... let it be adminfileupload page
2nd page... home page(this will be site home page)
i have one folder in solution explorer named images.
what i want to do is
adminfileupload has one fileupload control and a button named update
when any one browse image file with file upload and click the button(update) then the image should be viewed in home page and also saved in images folder. each time we chose a file and click the button(update) the image should be changed. and this image should be background image, i mean i also have to show some data from database over that image.
working in c# asp.net
Do you need to keep the other pictures too?
If not, you could just upload a picture give it a fix name, Then in the home page you could just set the background image the path to the picture and the fix name. If you have trouble overloading the picture(does not write over you should delete the picture first).But this is a simple approach and depending on the browser you test on it might keep the first picture in their temp file.
If you want to keep the other images you need to do some extra work and have a storing mechanism that will keep track of your pictures or a dynamic variable that changes the path of the resources. I sugest you take a look at the ASP.NET Personal Web Site Starter Kit It has a mechanism that implement a random picture on the first page but the pages are stored in sql database.
Happy coding
The best way I can think of to do this is on the button upload click event, store the file to the server folder. At the same time assign a Session variable the name of the file uploaded.
You will need to manage file names that get stored on the server or check if they already exist, or if different users upload the same file name, etc.
So Session("myImage") = currFileUploaded
Then do a Redirect back to the current page to show the image, which will link to the session variable that just stored the file name that was uploaded.
You'll need to check for a post back and hide or show the image as necessary.

flex - check image dimensions before upload using filereference

In my Flex application, I use a FileReferenceList that the user can populate with multiple files using fileList.browse() before upload.
I check each file's size and use fileList[i].upload() to upload to my server, this works fine.
I have a suspicion that this is not possible, but before upload I would like to convert each FileReference into an Image in order to check it lies within certain dimension tolerances.
I realise I can do this server side, but ideally I would like the check to appear on both client and server. Can anyone offer any help?
Thanks!
Take a look at this post at the Yahoo! Flash Blog. Flash 10 lets you work with images locally. They give a nice example with code of how you can process FileReference objects, specifically image files.

Resources