Click here to Skip to main content
15,897,704 members
Please Sign up or sign in to vote.
3.67/5 (2 votes)
See more:
hi friends....!


my task is upload only .pdf file using ajax file control


except .pdf file to display javascript message "Upload .pdf file only".

pls help me...!

i want exactly like this

http://www.asp.net/AjaxLibrary/AjaxControlToolkitSampleSite/AjaxFileUpload/AjaxFileUpload.aspx[^]
Posted

<ajaxtoolkit:ajaxfileupload id="AjaxFileUpload1" xmlns:ajaxtoolkit="#unknown">
    ThrobberID="myThrobber"
    ContextKeys="fred"
    AllowedFileTypes="jpg,pdf"
    MaximumNumberOfFiles=10
    runat="server"/></ajaxtoolkit:ajaxfileupload>



set AllowedFileTypes as pdf,try it
 
Share this answer
 
v4
U can achieve this by both client and server side validations
Visit Here:
http://www.aspsnippets.com/Articles/ASPNet-FileUpload-File-Extension-Validation.aspx[^]
 
Share this answer
 
Comments
Raju Bollam 4-Dec-13 7:47am    
but am using only AJAX FILE UPLOAD CONTROL
Tom Marvolo Riddle 4-Dec-13 7:52am    
Not at all a problem.Check the link and try it similar to that in Submit button event of CS page
Tom Marvolo Riddle 4-Dec-13 7:56am    
If you stuck then post your code.I'll try to fix it

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