March 28, 2006

Great ASP.NET 2.0 Tutorial Videos Online

There are some exceptionally good videos especially for those who want to jump-start .NET 2.0. Check it out and explore some really cool features associated with .net 2.0

Data Access – Create a new database from scratch, define a table, populate it with data.....

Master Pages and Site Navigation
– Create a consistent master page layout
for a site using the new ASP.NET Master Pages Feature.
Then create a site navigation menu using site navigation and the new TreeView

Membership and Roles
– Add an authentication and authorization system to
a site from scratch, and implement login, create user, change password, password
reset, and role based security in a secure way.

Profiles and Themes
– Enable per-user profile personalization on a site.
Then use this together with the new Themes/Skins feature to allow a visiting user
to customize and personalize the look and feel of a site.

Web Parts and Personalization
– Enable customizable drag/drop portal UI within
web-pages, and allow visiting users to customize the information experience they

Output Caching and SQL Cache Invalidation
– Learn how to use the output caching
feature in ASP.NET, as well as the new SQL Cache Invalidation support to build
super efficient output cached pages that stay in sync with the data within your

Partial Page Caching
– Learn how to use the Partial Page output caching with
ASP.NET to enable regions of a page to be cached, while also allowing other portions
of the page to stay dynamic.

– Learn how to build culture-aware and locale specific applications
using ASP.NET 2.0.

Wizard and Validation Control
s – Build a canonical form data registration
page using the new ASP.NET 2.0 Wizard control and validation control features.

Tips and Tricks
– This video highlights a number of cool new features in
ASP.NET 2.0, including: cross-page postback support, file uploading, the MultiView
control, encrypting web.config settings, and more.

AJAX Update:

-- This video shows building a todo Task List using Atlas, the new ASP.NET
AJAX framework.

March 24, 2006

Multiple CSS Classes on One Element/Control

You can apply multiple css styles on one element.

For example, let's assume we have two css classes in the style sheet named "nrml" and "center" respectively
.nrml { font-family: Arial, Verdana; font-size:10px;}
.center { text-align: center;}

You can apply both the above 2 styles to a div using the following syntax.
<div class="nrml center" id="Layer2">

It will render with both classes applied in Internet Explorer 5.0+, Netscape 7+ and Opera 7.
CSS 2.0 is really cool and there are lot of powerful unexplored areas

March 16, 2006

Make printer friendly web pages easily, avoid banners, images from printing

<LINK rel="stylesheet" type"text/css" href="print.css"

The styles in the print.css will be used only when the document is printed.
These styles will have no effect on the display of the document when viewed
using a monitor, audio browser, or any other non-printing device. So you need
not make seaparate printer friendly pages, but just make a printer friendly
style sheet and link it to web page with media="print".

I will explain it with real example. First we write a stylesheet for screen
display, say screen.css

BODY {color: silver; background: black;}

A:link {color: yellow; background: #333333; text-decoration: none;}

A:visited {color: white; background: #333333; text-decoration: none;}

A:active {color: black; background: white; text-decoration: none;}

H1, H2, H3 {color: #CCCCCC; background: black; padding-bottom: 1px; border-bottom:
1px solid gray;}

Now we have to make a relatively simple stylesheet for printing, say Print.css

BODY {color: black; background: white;}

A:link, A:visited {background: white; color: black; text-decoration: underline;
font-weight: bold;}

H1, H2, H3 {background: white; color: black; padding-bottom: 1px; border-bottom:
1px solid gray;}

DIV.adbanner {display: none;}

Now, to the top of the document, we add the following LINK elements:

This will do the trick. I will suggest to check the browser compatibility b4
implementing this.

March 15, 2006

Make your site as homepage of user's browser

To make a link like this

Make My Blog Your Homepage!

<a onclick="'url(#default#homepage)';this.setHomePage('YOUR_SITE_URL');" href="#">Make Me Your Homepage!</a>

February 27, 2006

Add Line Numbers in Your VS.NET Code Window

Go to VS.NET—>
Tools—>Options—>Text Editor

Choose the language and select the Line Number checkbox.

February 15, 2006

UDF For Capitalising First Letter in SQL Server 2000

This is a User Defined Function that will capitalize the first letter of a character after a space.
Also lowercase all capitalized words.
'MY NAME IS ROSHAN' --> 'My Name Is Roshan'.
Usage Select Capitalise('MY NAME IS ROSHAN')


Capitalise (@String VARCHAR(255))
DECLARE @StringCount int
SET @string = LOWER(@string)
SET @string = STUFF(@string,1,1,LEFT(UPPER(@string),1)) --Capitalize
the first letter
SET @StringCount = 0
WHILE @StringCount < LEN(@string)
IF SUBSTRING(@string,CHARINDEX(SPACE(1),@string,@StringCount),1)
= SPACE(1)
SET @string = STUFF(@string,CHARINDEX(SPACE(1),@string,@StringCount)+1,1,SUBSTRING(UPPER(@string),CHARINDEX(' ',@string,@StringCount)+1,1))
SET @StringCount = @StringCount + 1
RETURN @string

February 14, 2006

me Telepathist ??

Hey believe me I can read your mind.
Think a small number
Double this number
Add 8 to the result
Divide the result by 2
Subtract the original number
Convert this into a letter of the alphabet. (1=A, 2=B, 3=C, 4=D, 5=E etc.)
Think of the name of a country which starts with this letter.
Think of an animal whose name starts with the country's second letter.

hahaha You are wrong actually there is no elephants in Denmark except some in the zoo..

Thank you friends for not thinking about ostrich in Dominica. Still you don't think I mastered the art of telepathy, then try this
Think a 3-digit number where the first and last digits differ by 2 or more...
"reverse" number, obtained by reading it backwards.
Subtract the smaller of these two numbers from the larger one.
Add the result to its own reverse.

Is it 1089 ?

February 13, 2006

3 = 2, am I right ?

-6 = -6

9-15 = 4-10

9-15+(25/4) = 4-10+(25/4 ) // adding 25/4 to both sides:

9+(25/4)-15 = 4+(25/4)-10 //Changing the order

//(this is just like : a square + b square - two a b = (a-b)square.)
//Here a = 3, b=5/2 for L.H.S and a =2, b=5/2 for R.H.S.

. ' . (3-5/2)(3-5/2) = (2-5/2)(2-5/2)

3 - 5/2 = 2 - 5/2 //Taking positive square root on both sides

3 = 2

February 02, 2006


I am really fed up, for the last three months working in production support. Code drops, bug fixing and installation on daily basis. Seriously thinking about changing the job. I don't mind even if it is as a waitor in the hotel, but the fact is that I will be a failure in that too. Let us c

Guest: Waiter!
Me: Hi, my name is Roshan, and I'll be your Support Waiter. What seems to be the problem?
Guest: There's a fly in my soup!
Me: Try again, maybe the fly won't be there this time.
Guest: No, it's still there.
Me: Maybe it's the way you're using the soup; try eating it with a fork instead.
Guest: Even when I use the fork, the fly is still there.
Me: Maybe the soup is incompatible with the bowl; what kind of bowl are you using?
Guest: A SOUP bowl!
Me: Hmmm, that should work. Maybe it's a configuration problem; how was the bowl set up?
Guest: You brought it to me on a saucer; what has that to do with the fly in my soup?!
Me: Can you remember everything you did before you noticed the fly in your soup?
Guest: I sat down and ordered the Soup of the Day!
Me: Have you considered upgrading to the latest Soup of the Day?
Guest: You have more than one Soup of the Day each day?
Me: Yes, the Soup of the Day is changed every hour.
Guest: Well, what is the Soup of the Day now?
Me: The current Soup of the Day is tomato.
Guest: Fine. Bring me the tomato soup, and the check. I'm running late now.
[Returns with another bowl of soup and the check]
Me: Here you are, Sir. The soup and your check.
Guest: This is potato soup.
Me: Yes, the tomato soup wasn't ready yet.
Guest: Well, I'm so hungry now, I'll eat anything.

after 10 minutes ......

Guest: Waiter! There's a gnat in my soup!

The check:
Soup of the Day . . . . . . . . . . . . . . . . . . $5.00
Upgrade to newer Soup of the Day. . $2.50
Access to support . . . . . . . . . . . . . . . . $1.00

January 29, 2006

otta kambi naadham maathram moolum veenaa gaanam njaan

Take a break and listen one of my favorite song :)

otta kambi naadham maathram
moolum veenaa gaanam njaan
eka bhaavam etho thaalam
mooka raaga gaanaalaapam
ee dwanimaniyill ee swarajathiyill ee varisakalill..

January 04, 2006

To Re-register IIS

In order for your dot net web applications to run properly, the .NET Framework must be installed after Microsoft IIS is installed. If this is not the case for your machine, Microsoft provides the aspnet_regiis utility program to un-register and then re-register the .NET Framework. Its purpose is to ensure that ASP.NET is set up properly and otherwise manage the .NET installation.

Run the following command sequence to set up your Microsoft IIS web server properly.

//The "-u" flag uninstalls the current version of ASP.NET.
aspnet_regiis -u

//The "-i" flag installs the current version of ASP.NET.
aspnet_regiis –i

//The “-c” flag installs the client-side scripts for this version to the aspnet_client subdirectory of each IIS site directory.
aspnet_regiis -c