How to show Upload Multiple files control on Application Page?
-
2012년 4월 6일 금요일 오후 10:36
Hi
On my SharePoint 2010 application page I need to present users with my own Upload Multiple Files control. After the user uploads files, I need to get the SPListItemIDs.
If you know how this can be added please let me know.
Thanks in advance.
- 편집됨 ran009 2012년 4월 14일 토요일 오후 11:57
모든 응답
-
2012년 4월 7일 토요일 오전 7:32
You can create a custom SharePoint User Control that can be added to SharePoint pages. Please take a look at
- 답변으로 표시됨 Shimin Huang 2012년 4월 13일 금요일 오전 6:57
- 답변으로 표시 취소됨 ran009 2012년 4월 13일 금요일 오전 9:54
-
2012년 4월 7일 토요일 오전 8:50
Or you can open modal dialog that already referenced to location where you need upload file. (If it suitable for your task)
I used that way in one of my projects.
Don't happy, be worry...
- 편집됨 Aviw_ 2012년 4월 7일 토요일 오전 8:50
- 답변으로 표시됨 Shimin Huang 2012년 4월 13일 금요일 오전 6:57
- 답변으로 표시 취소됨 ran009 2012년 4월 13일 금요일 오전 9:51
-
2012년 4월 7일 토요일 오전 10:51
Take a look to the following article
Multiple File Upload User Control
I hope that help.
Regards.
Ahmed Naji SharePoint Geek
MCP|MCTS
My English SharePoint Blog | DotnetFinder My Arabic SharePoint Blog| CodeReloaded
My Gallery Contributions
SharePoint 2010 Twitter Web Part
SharePoint 2010 Custom Timer Job- 답변으로 표시됨 Shimin Huang 2012년 4월 13일 금요일 오전 6:57
- 답변으로 표시 취소됨 ran009 2012년 4월 13일 금요일 오전 9:51
-
2012년 4월 13일 금요일 오전 9:51
Thanks Aviv,
1. Do you have the code snippet to include the modal dialog? 2. Also if I use this, can I get the SPItemIDs of the uploaded files once the files are uploaded?
Thanks a lot.
-
2012년 4월 13일 금요일 오후 1:42
1.
var href = string.Format("{0}/_layouts/Upload.aspx?MultipleUpload=1&List={1}&RootFolder={2}&Source={3}", web.Url, list.ID.ToString("D"), list.RootFolder.ServerRelativeUrl + "/" + _folder, HttpUtility.UrlEncode(Page.Request.Url.ToString())); var addFilesLink = new LiteralControl(string.Format("<a href=\"{0}\" onclick=\"var options = {{url:'{0}', title:'Upload files', width:700, height:430, dialogReturnValueCallback: Function.createDelegate(null, function (result, returnValue) {{if (result == SP.UI.DialogResult.OK) {{if (returnValue == null) {{SP.UI.Notify.addNotification('Files succesfully added');}} else {{location.href = returnValue;}}}}}})}}; SP.UI.ModalDialog.showModalDialog(options); return false; \">Upload files</a>", href)); Controls.Add(addFilesLink);
2. Unfortunately, I think it is not possible. There is not good way, to get files from library with the latest creation time.Don't happy, be worry...
-
2012년 4월 14일 토요일 오후 11:56
Thanks Ahmed
The suggested control is good, however it still lets us select only one file at a time.
I am looking for a user control that allows the user to select multiple files at once, and then upload all of them together and then I need to get their item ids. Just like SharePoint 2010's "Upload Multiple Documents" feature works. All I need is to get the item IDs of the files uploaded after they are uploaded.
Help is appreciated.

