
Webster Velasco
Top achievements
Rank 2
Webster Velasco
asked on 02 Jul 2010, 04:10 PM
hi
i wanna know how can i get all the filename of the files uploaded?
for example i have these
fileinput 1 = file1.txt
fileinput 2 = file2.doc
fileinput 3 = file3.xls
i want to save in session or in a textbox each filename
regards
webster velasco
i wanna know how can i get all the filename of the files uploaded?
for example i have these
fileinput 1 = file1.txt
fileinput 2 = file2.doc
fileinput 3 = file3.xls
i want to save in session or in a textbox each filename
regards
webster velasco
2 Answers, 1 is accepted
0

Webster Velasco
Top achievements
Rank 2
answered on 02 Jul 2010, 04:45 PM
i have another problem
its not uploading
here is my page
its not uploading
here is my page
Public Sub UploadAllegati() |
Dim strContentType As String |
Dim strNomeFile As String |
Dim strPath As String |
If rulAllegati.UploadedFiles.Count > 0 Then |
For Each validFile As UploadedFile In rulAllegati.UploadedFiles |
strContentType = validFile.ContentType |
strNomeFile = System.IO.Path.GetFileName(validFile.FileName) |
strPath = Server.MapPath("~/Allegati/" & lstUFFICIO.SelectedItem.Text) |
If System.IO.Directory.Exists(strPath) = False Then System.IO.Directory.CreateDirectory(strPath) |
validFile.SaveAs(Path.Combine(strPath, validFile.GetName()), True) |
Next |
Else |
lblErrorMsg.Text = "No file uploaded" |
End If |
End Sub |
Protected Sub upload(ByVal sender As Object, ByVal e As EventArgs) Handles btnup.Click |
Call UploadAllegati() |
End Sub |
<table class="Plain" align="center"> |
<colgroup> |
<col class="Plain-odd" /> |
<col class="Plain-even" /> |
<col class="Plain-odd" /> |
<col class="Plain-even" /> |
</colgroup> |
<thead> |
<tr> |
<th scope="col" align="center" class="vzebra-comedy" colspan="4"><asp:label runat="server" ID="lblTitoloStep5" Text=" Destinatario " /></th> |
</tr> |
</thead> |
<tbody> |
<tr> |
<td colspan="4"> |
<telerik:RadUpload |
ID="rulAllegati" |
runat="server" |
InitialFileInputsCount="3" |
MaxFileInputsCount="10" /> |
<telerik:RadProgressArea id="progressArea1" runat="server"/> |
</td> |
</tr> |
<tr> |
<td><asp:Button runat="server" ID="btnup" text="upload" /></td> |
</tr> |
<tr> |
<td><asp:Label runat="server" ID="lblErrorMsg" CssClass="ErrMsg" /></td> |
</tr> |
</tbody> |
</table> |
0
Accepted
Hi Webster Velasco,
Please make sure that the upload is not inside RadAjaxPanel/UpdatePanel or ajaxified with RadAjaxManager. RadUpload cannot upload files using AJAX calls. This is a limitation of the XmlHttpRequest component, used in all AJAX frameworks for asynchronous calls to the application. In order to upload a file your application must perform a full page postback. More information on how to workaround this problem can be found here.
Best wishes,
Genady Sergeev
the Telerik team
Please make sure that the upload is not inside RadAjaxPanel/UpdatePanel or ajaxified with RadAjaxManager. RadUpload cannot upload files using AJAX calls. This is a limitation of the XmlHttpRequest component, used in all AJAX frameworks for asynchronous calls to the application. In order to upload a file your application must perform a full page postback. More information on how to workaround this problem can be found here.
Best wishes,
Genady Sergeev
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items