Recent Posts:

Archives:

Blogroll:

Get Email Updates:
Enter your email address:

Tuesday, 25 January 2011

ASP.NET Handling Empty Data in DataList control:

<asp:DataList ID="list" runat="server">
<ItemTemplate>
<!-- Add your Item Template Here -->
</ItemTemplate>
<FooterTemplate>
<asp:Label ID="lblEmpty" Text="No Result" runat="server"
     Visible='<%#bool.Parse((list.Items.Count==0).ToString())%>'>
</asp:Label>
</FooterTemplate>
</asp:DataList>


Monday, 24 January 2011

BLOCKQUOTE and CSS:

The standard format for blockquoted text is for it to be indented by 40px, which looks quite boring. But with CSS you can create blockquoted text that makes your quotes standout.


blockquote {border : 2px solid #EFEFF7; width: 400px; margin: 0 auto; padding: 10px; background-color: #EFEFF7; quotes: "\201C" "\201D";}

blockquote:before {content: open-quote; font-weight: bold; font-size:20px;}

blockquote:after {content: close-quote; font-weight: bold; font-size:20px;}

Add a border:
A simple way to improve blockquoted text is to add a border around it. For example, this CSS will put a 2 pixel wide border around all blockquotes in a page.


blockquote{border : 2px solid #EFEFF7;}

Blockquote Width:
To set the width of your blockquoted text add a width attribute.


blockquote{width: 400px;}

Align your blockquote
I prefer to allign my blockquotes to the centre of the page. To do that add a margin attribute. Margin is the space up/down/left/right around an element. Setting it to 0px auto means 0 padding on top and bottom, and auto left and right, to self-adjust. For this to work, you need to set a width or else the element will take up all the available space (as is the default behavior for block level elements).


blockquote{margin: 0 auto;}

Set the Background:
One of the easiest ways to get your quotations to stand out is to change the color of the background. I prefer a very light blue called "#EFEFF7". I like it because it doesn't compete or clash with my blue lettering or heading.


blockquote{background-color: #EFEFF7;}

Add quotes to your blockquote:
If you're using blockquote as it's supposed to be used, then you may need quotations to precede and follow the quotation. And with CSS it is very easy to do.


blockquote:before {content: open-quote; font-weight: bold; font-size:20px;}

blockquote:after {content: close-quote; font-weight: bold; font-size:20px;}

Finally, put it all together:
And here's what your completed style sheet looks like.

blockquote {border : 2px solid #EFEFF7; width: 400px; margin: 0 auto; padding: 10px; background-color: #EFEFF7; quotes: "\201C" "\201D";}

blockquote:before {content: open-quote; font-weight: bold; font-size:20px;}

blockquote:after {content: close-quote; font-weight: bold; font-size:20px;}

And here's the result!


Sunday, 16 January 2011

JoCo Cruise Crazy - Stephen "Stepto" Toulouse:

Xbox "BANHAMMER" and legend Stephen "Stepto" Toulouse recounts life at Microsoft.

Part One:


Part Two:


Click here to buy Stepto's new book 'A Microsoft Life' for Kindle
For more information about 'A Microsoft Life' see the below post on Stepto's blog:
I Bookified My Blogerations! - by Stepto (30/11/10):
Tuesdays are when new movies and new games get released, and besides this post is a long time coming, but I’m very proud to announce the release of my first book, A Microsoft Life.

The story of how the book came to be is an odd one. This year being my 15th as a Microsoft employee, I took some time to collect a ton of the Microsoft lore and stories that I have written about here on my blog, expand and rewrite them, then compile them into a rough narrative. Once the manuscript was complete I handed it over to a professional editor (the wonderful Joanne Starer) and my friend Mark Pedersen designed the cover..... READ MORE.


Newer›  ‹Older