Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have to upload multiple files. So i am using Ajax.ActionLink for that.

ASP
@Ajax.ActionLink("Choose File",
                               "UploadItemView",
                               new { },
                               new AjaxOptions
                               {
                                   UpdateTargetId = "replaceDiv",
                                   InsertionMode = InsertionMode.Replace,
                                   HttpMethod = "GET",
                                   //OnBegin = "startPreLoader",
                                   OnSuccess = "stopPreLoader",
                                   OnFailure = "stopPreLoader"
                               }, new
                               {
                                   @id=1,
                                   @class="btn btn-primary offset-top-2",
                                   /*@id=item.GetHashCode().GetHashCode(),
                                    * onclick = "fileUploadFunction('" + item.GetHashCode().GetHashCode() + "')"*/
                                   onclick = "fileUploadFunction('" + 1 + "')"
                               })


So, i want to open file selection expolore dialod when click the this action Link and get the file name, physical path when select a file. what i want is , select files one by one and display details of them on the screen when select them.
Pls help me.

And also, how can i put the "type" attribute in the actionLink?
Thank u.
Posted

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900