CPSRI
asked on
File Upload control w.r.t. size of File in C# asp.net
Hi ,
i am using three File Upload controls in my project . My requirement is allow user to upload only 1 MB Maximum File size from Each Control . If the user upload file size more than 1 MB display An Error Message to the User .How can i handle this at code behind in C# .Net . Thanks in Advance.
i am using three File Upload controls in my project . My requirement is allow user to upload only 1 MB Maximum File size from Each Control . If the user upload file size more than 1 MB display An Error Message to the User .How can i handle this at code behind in C# .Net . Thanks in Advance.
ASKER
hi Tchuki ,
Is it work in Framework 2.0.? i tried it in Framework 2.0 but not working ..
Is it work in Framework 2.0.? i tried it in Framework 2.0 but not working ..
ASKER
hi Tchuki .. while executing your give code raising the bellow exception ..
"Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it. This exception is only raised if a debugger is attached to the process."
"Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it. This exception is only raised if a debugger is attached to the process."
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
Open in new window