Tuesday, 10 September 2013

Fixed Header and Footer using CSS

If you want to create a header and footer part which will be fixed in their place then follow the below steps.

Place the below css in the page.
 <style type="text/css">
        #header
        {
            background: #eee;
            border: 1px solid #666;
            height: 60px;
            left: 0;
            position: fixed;
            width: 100%;
            top: 0;
            text-align: center;
        }
        #content
        {
            margin: 0 auto;
            overflow: auto;
            padding: 80px 0;
            width: 940px;
        }
        #footer
        {
            background: #eee;
            border: 1px solid #666;
            bottom: 0;
            height: 60px;
            left: 0;
            position: fixed;
            width: 100%;
            text-align: center;
        }
    </style>

Place the below content in the page.
<div id="header">
            Header Content
</div>
<div id="content">
           Text part will place here.
</div>
<div id="footer">
            Footer Content
</div>

Run the project by using F5 and see the output.

Wednesday, 17 July 2013

Handler "svc-Integrated" has a bad module "ManagedPipelineHandler" in its module list

If you  will get this error while running your wcf application then you didn't install the prerequistes for ASP.NET 4.

To install the prerequistes go to
Start --> All Programs --> Microsoft Visual Studio 2008 --> Visual Studio Tools --> Open Visual Studio Command Prompt.
Run Visual Studio 2008 Command Prompt as “Administrator”.

Type the following:
     aspnet_regiis.exe -i

Run your application.

Saturday, 13 July 2013

Windows could not start the SQL Server (MSSQLSERVER) service on Local Computer.Error 1069: The service did not start due to a logon failure.

I was getting the same error since I had changed the password of my computer. I have changed in the services after that it is working fine.

Go to Run-->services.msc--> SQl Server(MSSQLSERVER) . Right click --> Properties -->  Click on "Log on" tab. I have changes the password and retype the current windows password again. It works.

Thursday, 27 June 2013

Store Datatable Column Name in an Array Using LINQ

If you want to store datatable column values in an array using LINQ you can achieve this by the following ways.

string[] ColName = dt.Columns.Cast<DataColumn>().
                                   Select(x => x.ColumnName).ToArray();