Click here to Skip to main content
15,904,346 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionError in invoking upload_serverclick method Pin
Hari_101016-Jul-07 19:55
Hari_101016-Jul-07 19:55 
AnswerRe: Error in invoking upload_serverclick method Pin
N a v a n e e t h16-Jul-07 20:12
N a v a n e e t h16-Jul-07 20:12 
QuestionRe: Error in invoking upload_serverclick method Pin
Hari_101016-Jul-07 20:21
Hari_101016-Jul-07 20:21 
AnswerRe: Error in invoking upload_serverclick method Pin
N a v a n e e t h16-Jul-07 20:42
N a v a n e e t h16-Jul-07 20:42 
GeneralRe: Error in invoking upload_serverclick method Pin
Hari_101016-Jul-07 20:45
Hari_101016-Jul-07 20:45 
GeneralRe: Error in invoking upload_serverclick method Pin
N a v a n e e t h16-Jul-07 20:59
N a v a n e e t h16-Jul-07 20:59 
GeneralRe: Error in invoking upload_serverclick method Pin
Hari_101016-Jul-07 21:07
Hari_101016-Jul-07 21:07 
GeneralRe: Error in invoking upload_serverclick method Pin
N a v a n e e t h16-Jul-07 21:32
N a v a n e e t h16-Jul-07 21:32 
Hari_1010 wrote:
my client dont want that much file upload control to be seen in the UI. The requirement of my client is, he needs only one file upload control and in one click he wants to select more than one file at time.


Why don't you tell this first. So whatever code I written for you in previous posts became unusable Mad | :mad: Mad | :mad: . No issues, let's start again from the scratch.

Now for this requirement we can follow the method what that article say's. But you can't reuse the article code since it won't work perfectly. You need to do some small changes in his code. You can try with this

1. Put one file upload control.( As your client said )
2. Put list box just to show the files selected. No much role in this movie
3. Place two buttons with "Add to List", and "Upload" texts.
4. OnClick of "Add to List" button, get the postedfile object and store that in one arraylist.
5. Now move arraylist to one session. ( Used to get the value across page postbaccks )
6. On Upload button click cast session to arraylist. Then cast array list object to HttpPostedFile object. Now use SaveAs() method in that object

In that article author is not using sessions. Your Upload button code would be

ArrayList ObjArr = (ArrayList)Session["files"];
HttpPostedFile postFile = (HttpPostedFile)ObjArr[0];
Response.Write(postFile.FileName);
Response.Write(postFile.ContentLength.ToString());
postFile.SaveAs(Server.MapPath("/filename.zip"));



GeneralRe: Error in invoking upload_serverclick method Pin
Hari_101016-Jul-07 20:58
Hari_101016-Jul-07 20:58 
GeneralRe: Error in invoking upload_serverclick method Pin
N a v a n e e t h16-Jul-07 21:02
N a v a n e e t h16-Jul-07 21:02 
Questionhttp error 500(argent) Pin
Piyush Vardhan Singh16-Jul-07 19:46
Piyush Vardhan Singh16-Jul-07 19:46 
AnswerRe: http error 500(argent) Pin
Piyush Vardhan Singh16-Jul-07 19:48
Piyush Vardhan Singh16-Jul-07 19:48 
Questionhow to interact an image to a database value Pin
duo!@#16-Jul-07 19:45
duo!@#16-Jul-07 19:45 
AnswerRe: how to interact an image to a database value Pin
Mubashir Javaid16-Jul-07 20:15
Mubashir Javaid16-Jul-07 20:15 
GeneralRe: how to interact an image to a database value Pin
duo!@#16-Jul-07 21:53
duo!@#16-Jul-07 21:53 
GeneralRe: how to interact an image to a database value Pin
duo!@#16-Jul-07 22:00
duo!@#16-Jul-07 22:00 
GeneralRe: how to interact an image to a database value Pin
Mubashir Javaid16-Jul-07 22:31
Mubashir Javaid16-Jul-07 22:31 
GeneralRe: how to interact an image to a database value Pin
duo!@#16-Jul-07 22:02
duo!@#16-Jul-07 22:02 
GeneralRe: how to interact an image to a database value Pin
Mubashir Javaid16-Jul-07 22:08
Mubashir Javaid16-Jul-07 22:08 
AnswerRe: how to interact an image to a database value Pin
_AK_16-Jul-07 20:18
_AK_16-Jul-07 20:18 
Questiontable in classic asp Pin
Sebastian T Xavier16-Jul-07 19:43
Sebastian T Xavier16-Jul-07 19:43 
AnswerRe: table in classic asp Pin
N a v a n e e t h16-Jul-07 20:13
N a v a n e e t h16-Jul-07 20:13 
GeneralRe: table in classic asp Pin
Sebastian T Xavier16-Jul-07 22:44
Sebastian T Xavier16-Jul-07 22:44 
QuestionBuffer size is too small or string is null byte ? Pin
Kamal.Afridi16-Jul-07 19:42
Kamal.Afridi16-Jul-07 19:42 
Questionvbscript Pin
Navneet Hegde16-Jul-07 19:28
Navneet Hegde16-Jul-07 19:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.