Google

Wednesday, February 16, 2011

C# - CSS - Create Simple Wrapper

This is copy and paste example.  Create simple html page and then use stylesheet listed below.
1. In your aspx add the following <div> elements:
<body>
    <form id="form1" runat="server">
    <div id="PageWrapper">
        <div id="Header">
            Header Goes Here
        </div>
        <div id="MenuWrapper">
            Menu Goes Here
        </div>
        <div id="MainContent">
            Main Content goes here
        </div>
        <div id="Sidebar">
            Sidebar Goes Here
        </div>
        <div id="Footer">
            Footer Goes Here
        </div>
    </div>
    </form>
</body>

2.  Create css like this:
#PageWrapper
{
    width: 844px;  
}
#Header
{
    background-color: #C0C0C0;
    width: 844px;
    height: 86px;
}
#MenuWrapper
{
    width: 844px;
}
#MainContent
{
    width: 664px;
    float: left;
}

#Sidebar
{
    background-color: Gray;
    width: 180px;
    float: left;
}
#Footer
{
    background-color: #C0C0C0;
    width: 844px;
    clear: both;
}


Note that MainContent and SideBar are on the same line.
Also note that clear: both; declaration will clear left and right floats.

Tuesday, February 15, 2011

MS SQL / Visual Studio - EXPORT TABLE or VIEW with records into sql statement

In Visual Studio go to view/Server explorer.
Right click on database (you may need to create new connection if required) and select publish to provider.
Click next and select RJM BackOffice, uncheck script all objects.
Click Views then next
Select View then next
Script to file then next
Script for target database - you may need to select 2000
Next and finish.

MS SQL - Rebuild All Indexes

MS SQL - Rebuild All Indexes

Microsoft Access - Replace New Line Character

Replace(Replace([fieldName],Chr(10),""),Chr(13),"")

Microsoft Access - Stop Running Query

CTRL + Break

MS SQL - Edit more then 200 records

- select Edit top 200 records.
- right click/Pane/SQL
- modify sql (top 300) order by, etc.