troubleshooting Question

How to compare a value returned by fileupload to ensure it contains 1 of 4 possible filename values (ASP.NET using C#) ?

Avatar of zimmer9
zimmer9Flag for United States of America asked on
ASP.NETC#
1 Comment1 Solution155 ViewsLast Modified:
I am developing an ASP.NET application using C# and .Net Framework 4.0.

I employ the following statement to retrieve the value returned from a browse by the user:

txtFilename.Text = FileUpload2.PostedFile.FileName;

How would you compare the value contained in txtFilename.Text to ensure that it contains one of the following 4 values keeping in mind that txtFilename.Text is prefaced by a drive:
1) MonthlyChecks.txt 2) ML1.txt 3) OS_Mastfile.txt 4) ReversePositive.txt
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
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 1 Answer and 1 Comment.
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