.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Fileupload control event....

Posted By: nikhil     Posted Date: April 20, 2010    Points:2   Category :ASP.Net
I want to know how to raise an event for fileupload control....
In my project, as soon as I select a file(Image) it should show FILENAME,EXTENSION & SIZE in the labels given below.

Pls reply me....

Thanks in advance.

Responses
Author: Amit Mehra             
Posted Date: April 20, 2010     Points: 5   

HI,

you can use regular expression validator control and give you validation expression

ValidationExpression="[a-zA-Z0_9].*\b(.doc|.DOC|.vsd|.VSD|.xls|.XLS|.pdf|.PDF|.jpeg|.JPEG|.jpg|.JPG|.jpe|.JPE|.png|.PNG|.gif|.GIF)\b"

you can modify the above expression regarding what all file type you want

Thanks,
Amit
Please "Mark As Answer " if this post help you.


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend