Tuesday, April 30, 2013

How To- Convert Data Table into List

DataTable To List
Recently I have posted an article Convert a Generic List to a Datatable. Today I am explaining here the reverse way of my previous article i.e conversion of DataTable into List.

You may also like these posts Get Property Names using Reflection in C#Hard drive information using C#Create Directory/Folder using C#Check Internet Connection using C#SQL Server Database BackUp using C#Partial Methods, Contextual KeywordC# Static Methods and some other articles related to C#ASP.Net and SQL Server.

 So Lets start the conversion of DataTable into List. First of all add the following namespaces-

Thursday, April 25, 2013

C#- Constructor Chaining in C#

Constructor Chaining
In this post, I am explaining about Constructor Chaining in  C#. I konw this will be taken for granted for those of us who have been working with  C# for a while now but may be a newbie will find this helpful.

In my previous posts, I explained Convert a Generic List to a Datatable, Get Property Names using Reflection in C#Hard drive information using C#Create Directory/Folder using C#Check Internet Connection using C#SQL Server Database BackUp using C# and some other articles related to C#ASP.Net jQuery, Java Script. and SQL Server.

What is Constructor Chaining? 

Constructor chaining is an approch where a constructor calls another contructor in the same class or base class.

Wednesday, April 24, 2013

How To- Validate Numeric Values only in TextBox using Java Script/jQuery

In this post, I will explain how to validate user to enter only numeric values in TextBox using jQueryJava Script.

In previous posts, I explained Page Scroll to Top with jQuery, Automatically Refresh Page Using Java Script , How to Create a Textarea Character Counter, Animated Sliding Recent Post Widget For Blogger, Change Input to Upper Case using Java Script, Calculate Age from Date of Birth Using Java Script, jQuery .toggleClass() example and some other articles related to jQuery, Java Script etc.

To validate numeric values in TextBox, we need to write the following jQuery or Java Script function.

How To- Convert a Generic List to a Datatable

Today when I was working I my project, I need to convert the List into a DataTable for some reasons. I goggled it and get some solutions for this. But I get a very good solution Here.So I am posting that solution for my readers.

In my previous posts, I explained Get Property Names using Reflection in C#Hard drive information using C#Create Directory/Folder using C#Check Internet Connection using C#SQL Server Database BackUp using C#Partial Methods, Contextual KeywordC# Static Methods and some other articles related to C#ASP.Net and SQL Server.

Here,I have not constrained reference type or value type only. We need to take care of both the cases while converting List to DataTable as the underlying type can be both value or reference type.

Wednesday, April 17, 2013

Blogger- Adding Floating Facebook Like Box into Blogger Blog

In my post Adding Facebook Like Box into Blogger Blog, I explained you how you can add Facebook Like box in your blogger blog. This post is the refined version of my previous post. Here I will show you how you can add floating Facebook Like box into you blogger blog.

You can find some more articles related to Blogging, SQL ServerASP.Net, C# and many more. To add floating Facebook like box follow the below procedures.

Tuesday, April 16, 2013

How To- Get Property Names using Reflection in C#

In this post, I will show you how you can get the name of all properties using Reflection in C#.

In my previous posts, I explained Hard drive information using C#, Create Directory/Folder using C#, Check Internet Connection using C#, SQL Server Database BackUp using C#, Partial Methods, Contextual Keyword, C# Static Methods and some other articles related to C#, ASP.Net and SQL Server.

 

Get Property Names-

To get the name of properties of a specific type use Type.GetProper­ties method. This method returns the array of PropertyInfo object. From this object you can find the name of property through PropertyInfo.Name property.

Saturday, April 13, 2013

How To- Check Primary Key Exists or not in Table

This is a simple tip post that may seem obvious and taken for granted for those of us who have been working with SQL Server for a while now but may be a newbie will find this helpful.

Here, I will give you a simple tip to check that primary is exists or not in table.

You can find some other articles and tips related to C#, ASP.Net and SQL Server in this blog.

Friday, April 12, 2013

How To- Get System Information using C#.

Here, I am going to explain you how to get the system information like OS information, Processor information etc using C#.

In my previous posts, I explained Hard drive information using C#, Create Directory/Folder using C#, Check Internet Connection using C#, SQL Server Database BackUp using C#, Partial Methods, Contextual Keyword, C# Static Methods and some other articles related to C#, ASP.Net and SQL Server .

For retrieving system information, we will use System.Management namespace.Using this namespace we can get lot of information about the system. For using this namespace follow the steps given below.

Thursday, April 11, 2013

How To- Get hard drive information using C#

In this post, I will explain how to get the hard dive information of your system using C#.

In my previous posts, I explained Create Directory/Folder using C#, Check Internet Connection using C#, SQL Server Database BackUp using C#, Partial Methods, Contextual Keyword, C# Static Methods and some other articles related to C#, ASP.Net and SQL Server .

TO get the hard drive information first we need to add the following namespace.

Wednesday, April 10, 2013

ASP.Net- Creating Directory in C# | Creating Folder in C#

In this post, I will explain how to create , delete directory or folder using C#.

In my previous posts, I explained Check Internet Connection using C#, SQL Server Database BackUp using C#, Partial Methods, Contextual Keyword, C# Static Methods and some other articles related to C#, ASP.Net and SQL Server .

For creating, deleting directory using C#, First of all you will have to add the following namespace in your code file.

SQl Server- Reset Identity Column in SQL Server

If you deleted all the records from the table and there is an Identity column in your table, You will see that when you insert a new record in your table then Identity column value starts from the last value of that column incremented by your step value.

If you want to start the Identity column value from the seed value after deleting all the record then you must have reset the Identity column value. Here, I am going to show you that how you can reset Identity column value in SQL Server?.

Monday, April 8, 2013

Blogger- Adding Facebook Like Box into Blogger Blog

Promoting your blog or web site, Facebook page is a great way. Facebook like box is a widely used social plugin from Facebook developers. Facebook like box helps your visitors to become a regular reader just by clicking a "Like" button. So this like box can increase number of your Facebook fans.

Here I will show you how you can add Facebook Like box into you blogger blog.

You can find some more articles related to Blogging, SQL ServerASP.Net, C# and many more. To add the Facebook like box follow the below procedure.

Friday, April 5, 2013

SQL Server- Insert Values into Identity column

In my previous post Identity Column in SQL Server , I explained about Identity column and how you can create Identity column in table.In this post , I am going to show you that how you can insert values into Identity column.

In previous posts, I explained STUFF Function, LEN Function, UNICODE Function, LEFT Function, CHARINDEX Function, CHAR Function, ASCII Function, Simple script to backup all SQL Server databases, Table-Valued Parameters and some other articles related to SQL ServerASP.Net, C#.

Thursday, April 4, 2013

Creating Extension Method for Enumerated Type

In C#, you can extend the functionality of  Enumerated type by  using extension method same as for other types. Here , I will show you a simple example of creating extension method for Enumerated  type.

In my previous posts, I explained Check Internet Connection using C#, SQL Server Database BackUp using C#, Partial Methods, Contextual Keyword, C# Static Methods and some other articles related to C#, ASP.Net and SQL Server .

Below, I have created an extension method for DayofWeek enumarated type.

Tuesday, April 2, 2013

Check Internet Connection availability in ASP. Net

Here I will show you a simple tip for checking internet connection availability in ASP.Net using C#.

In my previous posts, I explained SQL Server Database BackUp using C#, Partial Methods, Contextual Keyword, C# Static Methods and some other articles related to C#, ASP.Net and SQL Server .

To check the internet connection availability in ASP.Net using C# , you have to write the following code-

Monday, April 1, 2013

SQl Server- Identity Column in SQL Server

In this post, I will explain about the IDENTITY column into table in SQL Server.

In my previous posts, I explained STUFF Function, LEN Function, UNICODE Function, LEFT Function, CHARINDEX Function, CHAR Function, ASCII Function, Simple script to backup all SQL Server databases, Table-Valued Parameters and some other articles related to SQL Server. 

 

Identity Column


IDENTITY column is an auto incrementing column provided by SQL Server. SQL Server will take care of incrementing this column automatically.This is much like an AutoNumber field in Microsoft Access or a sequence in Oracle.

If You Enjoyed This Post Please Take 5 Seconds To Share It.

^ Scroll to Top hgpromo