This is a migrated thread and some comments may be shown as answers.

AsyncUpload AllowedFileExtensions Dynamically

2 Answers 80 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Amit
Top achievements
Rank 1
Amit asked on 23 Jul 2012, 05:13 AM
hello, 
I am using AsyncUpload in ASP.Net with Vb . i want to add File Extension Dynamically from Code behind but it doesn't work. Below is my Code please help me if any one have idea its urgent

Dim strIds as string=".wmv, .mp4, .pdf, .swf"
Dim ids As String() = {strIds}
Upload1.AllowedFileExtensions = ids

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 23 Jul 2012, 07:48 AM
Hello Amit,

Try setting the AllowedFileExtension as shown below.
VB:
Upload1.AllowedFileExtensions = New String() {".wmv", ".mp4"}

Thanks,
Shinu.
0
Amit
Top achievements
Rank 1
answered on 23 Jul 2012, 08:57 AM
Hello Shinu,
Thannk you for quick replying but its not working 
 while i am geting file extension from sql database

e.g.
Dim
 strIds as string = "select FileExt from sqlserver"
Tags
AsyncUpload
Asked by
Amit
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Amit
Top achievements
Rank 1
Share this question
or