Google+

Wednesday, May 4, 2011

Get Details OF Column in IDataReader

 
IDataReader reader = null;

    reader = ---some  function return IDataReader----

  DataTable dataTable = reader.GetSchemaTable();


Note:-Please comment and reply me.

DataTable.Columns Property

The following example prints each value of each row in a table using the Columns property.



private void PrintValues(DataTable table)
{
    foreach(DataRow row in table.Rows)
    {
        foreach(DataColumn column in table.Columns)
        {
            Console.WriteLine(row[column]);
        }
    }
}


Note:-Please comment and reply me.

Monday, May 2, 2011

New Features of ASP.NET 4.0

Check out this SlideShare Presentation:

Sunday, May 1, 2011

Fetch All Information About Client Request


You get all infomation about the client request by request header.In ASP.NET,

 you get all  request header infromation by using these:-

NameValueCollection variables = Request.ServerVariables;

To get user agent information use below :-

            string agent = variables["HTTP_USER_AGENT"];


To get user agent information use below :-


 Request.ServerVariables["HTTP_X_FORWARDED_FOR"]



Note:-Please comment and reply me.