If you are developing web application, data validation is one of the major aspect while developing applications. ASP.Net MVC has defined a great approach for data validation using Data Annotations. One may have query that how can we implement our own custom validation which should act like data annotations. So here I am going to narrate how we can create custom validation in MVC using data annotations.
Sometimes you may need to read Excel file in c# and bind result in grid. Or you may need to store retrieved data into database. So here is the sample code which narrates how to read excel file in C#.
This code is able to read both extensions (.xls and .xlsx ) of excel file. Hope it will help you.