Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
hello friends
 
i want to know code that allow user only upload three image if he is trying to upload more than three one message show him that you couldn't upload more than three image can you all suggest me code or any reference link please
Posted 12-Mar-13 21:14pm
Comments
Imtiyaz_mi at 13-Mar-13 2:17am
   
What tool are you using to upload images, I mean ajax tool, fileupload controls ?
Azziet at 13-Mar-13 2:21am
   
you can do this by managing a record for image upload limit in database...check uploloaded image count while uploading image...if it >3 then show message
Nandakishorerao at 13-Mar-13 2:22am
   
refer this tip
http://www.codeproject.com/Tips/531692/Multiple-file-upload-using-jQuery
Atul Rokade at 13-Mar-13 2:40am
   
azziet sir can u explain me brief.
 
imtiyaz_mi sir im using normal fileupload control
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hi!!! firstly i will suggest you if want to make restriction to image so whats the problem
give three controls for upload!!!
and on other hand if you save image on data base so make function for it
 
like
//////////////count image from databse///
if(image count<="3")
{
///your message///
}

check this link
 
Previewing Image in ASP.NET Image Control using C#[^]
  Permalink  
Comments
Atul Rokade at 13-Mar-13 3:24am
   
ok shubham sir :)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I hope you know how to upload exactly one file. Something like this:
 
<form method="post" .... >
 
<input name="image1" type="file"> Image #1</input>
 
</form>
 
If you add two more input elements in the middle, you will allow the user to upload exactly three. This is the simplest method you can use.
 
—SA
  Permalink  
Comments
Atul Rokade at 13-Mar-13 2:58am
   
thank you sir sergey sir your valuable response but i want do this using one fileupload control only ;)
Sergey Alexandrovich Kryukov at 13-Mar-13 3:02am
   
I don't know why, what's wrong with this simple solution; your case is so simple and yet demanding the limitation, that this simplest solution can be the best for your and the user. You decide, anyway...
—SA
Atul Rokade at 13-Mar-13 3:09am
   
ya sergey sir, whatever u said it acceptable for my side but client doesn't want that :( :'( that's the problem otherwise your solution is best ..
Sergey Alexandrovich Kryukov at 13-Mar-13 3:14am
   
I do understand, it can be difficult. Just one note: sometimes a user does not know what they really need, but can be convinced if you provide some good solution and show the prototype. If the user a developer? If not, they don't know the difference between those implementation and might choose whatever is clear and convenient.
—SA
Atul Rokade at 13-Mar-13 3:18am
   
ok then sir :) i just implement your solution n convinced mad client ;) thank u very much ur support and solution :)
Sergey Alexandrovich Kryukov at 13-Mar-13 11:30am
   
What you say sounds really impressive, my congratulation.
It's a great pleasure to help such people who actually can understand things and make things happen.
Then please accept my answer formally (green button). You can accept any number of answers.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 George Jonsson 215
1 Kornfeld Eliyahu Peter 169
2 Zoltán Zörgő 139
3 PIEBALDconsult 130
4 OriginalGriff 120
0 OriginalGriff 6,165
1 DamithSL 4,658
2 Maciej Los 4,107
3 Kornfeld Eliyahu Peter 3,649
4 Sergey Alexandrovich Kryukov 3,342


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 13 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100