Validating duplicate records in asp net

The Data Table is saved in View State so that same Data Table can be re-used to remove (delete) duplicate rows (records). First a dynamic Data Table object is created and its schema (Table structure and Columns) is defined programmatically.

The To Table method is a really helpful and easy to use method, where the first parameter is of Boolean type which when true means it will return distinct (unique) rows (records), while the next parameters are the name of the Columns whose data you want to be distinct (unique). Here Mudassar Ahmed Khan has explained, how to dynamically (programmatically) at runtime create a Data Table using C# or VB. Once the columns are defined, then rows (records) are added to the dynamically generated Data Table. The imported Excel File data is then displayed in ASP. Here Mudassar Ahmed Khan has explained how to use a Data Table as a temporary storage table in ASP.

validating duplicate records in asp net-43validating duplicate records in asp net-81validating duplicate records in asp net-26

Here Mudassar Ahmed Khan has explained with an example, demo and attached sample code, how to create a basic Crystal Reports 13 Application using Data Set or Data Table in ASP. Once the dynamic Data Table is populated with records, it is bound to an ASP. Here Mudassar Ahmed Khan has explained how to upload Excel File and then read and import its data into Data Set or Data Table using C# and VB. Net for storing the records that we need for processing in View State or Session variables.

The concept is to create a dynamic Data Table, store some values in it and then keep the Data Table either in View State or Session depending on whether you want it only on the page or throughout the application respectively.

In order to illustrate this concept I will make use an ASP.

If the same record is not in the database then it insert the record in the database otherwise not.

So we need to create the Stored procedure to perform this."If you like my work; you can appreciate by leaving your comments, hitting Facebook like button, following on Google+, Twitter, Linked in and Pinterest, stumbling my posts on stumble upon and subscribing for receiving free updates directly to your inbox .

Last modified 01-Sep-2016 07:12