troubleshooting Question

Asp.net file upload validation using javascript and C#

Avatar of Devildib
Devildib asked on
.NET ProgrammingC#JavaScript
12 Comments3 Solutions1232 ViewsLast Modified:
Hi experts,

I have an asp.net webform on which i have various controls like text boxes and a file upload control with browse textbox , button and an upload button.I have a validation check in place for gif image uploads only.When i upload an image, the image gets displayed in an image control.Now, as a negetive testcase, when i manually enter a something in the browse textbox like abc.gif, the extension check gets by passed in javascript.And control doesnot pass on to the c# upload click event.Can you provide some logic for complete validation client and server side?I need to do this using javacsript and c# only.
ASKER CERTIFIED SOLUTION
jorge_toriz
Research & Development Manager

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 12 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros