Showing posts from January, 2010

Create a webpage with Div tags and no tables

I was searching to figure out how to create a page layout with no tables for one of my SharePoint projects. I designed one with the basic <div> tag and css and no <tables>, I used inline CSS script for this.

The code I used is as below
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<!-- <link rel="stylesheet" href="" type="text/css"> -->
<style type="text/css">
margin:0px auto;
border:1px solid #acb;
#header {
border:1px solid #bbb;
#content {


#content div {
border:1px solid #bbb;
#content-left {

#content-main {

How to create files of any size

How to create files of any size
fsutil file createnew C:\Brij\One_MB_File.doc 1024000
Above command will create 1 MB file called "One_MB_File.doc" at C:\Brij location.
You can provide any file extension - e.g. .txt, .xls, .ppt, .pdf etc.
This command may help in creating files for upload/download test in SharePoint or any other application.

Sharepoint Maintenance Page

Recently I got a requirement asking me to create a "Maintenance Page" in my Sharepoint Farm for a new Release.
I was trying to set a simple "Offline.htm" page in IIS and setting it as the default page in the Documents, but unfortunately this would never work as in a regular .Net application. Done a bit research and found a good article of Scott Guthrie. I would walk through the steps to get this done -
Step 1.Create a page "App_Offline.htm" in the Root Site - When see this page it would unload the AppDomain for the application and would render this page.
However, there is a catch, I was trying to do this the application was down but the page was not rendered instead I was getting a 404, found out this was because if the content in the ".htm" page is less than 512 bytes IE would only render the custom error page.

Step 2.
Make the Page size greater than the limit, something similar to this- Bingo !!! and it should work .