Click here to Skip to main content
15,665,004 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to upload industry name in database through excel sheet but i want to do validation like only numbers and special character are not allowd.plz help me?
Updated 9-Aug-13 17:53pm
Maciej Los 9-Aug-13 9:04am    
We can't read in your mind. We don't see your monitor. Can you help us to understand your issue?

1 solution

For that you can do 2 things.

1.Do client side validation for excel using cell formatting,formula,etc.

2.Do server side validation for the uploading data by using reg-expression or other validation methods

As a example how to check empty string ?

private string EmptyStringValidation(string strValue, string strFieldName)
            if (string.IsNullOrEmpty(strValue))
                return "Empty " + strFieldName + ", ";
                return string.Empty;


I hope this will help to you.
Share this answer

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