Google Search


Friday, September 5, 2008

Microsoft Ad

Microsoft launched new ad featuring Jerry Seinfeld and Bill Gates.

Microsoft plans to spend $300 million on ads and Jerry Seinfeld gets $10 million.

I think this ad makes no sense.Just watch this ad

Wednesday, September 3, 2008

Google Chrome - Internet browser

Google release new beta internet browser named "Google Chrome".

Google Chrome is an open source web browser developed by Google. The name is derived from the graphical user interface frame, or "chrome", of web browsers. The open source project behind Google Chrome is known as Chromium.

Primary design goals were improvements in security, speed and stability compared to existing browsers. There were also extensive changes in the user interface.

For more details Google Chrome

Wednesday, July 23, 2008

Google Talk for iPhone

Gooogle released new version of Google Talk designed specifically for Apple iPhone.So now chat with your google friends from iPhone.

It works right in your Safari browser, so there's no need to download or install anything -- just go to and sign in.*

*Google Apps users: visit from your iPhone's browser, but be sure to replace '' with your actual domain name.

WordPress for iPhone

Worpress application is now available for iPhone.Wordpress for iPhone app works with both blogs and your self hosted wordpress blogs.From iPhone you can write posts, upload photos and edit your wordpress blogs.It is available for wordpress 2.5.1 or higher version. Download WordPress for iPhone

Video for WordPress iPhone

Tuesday, June 24, 2008

Nokia buys Symbian

Mobile phone maker Nokia Finland based announced today that it plans to acquire the remaining 52 % shares of Symbian (Symbain Os) that it does not already own for 264 million euros.(£208 million)

For more info Nokia buys Symbian

Sunday, June 22, 2008

Yahoo mail Launches two new domains Rocketmail and Ymail

Yahoo mail Launches two new domains Rocketmail and Ymail.Rocketmail was one of the very first free Webmail services, acquired by Yahoo in 1997 ($80 million).And then Yahoo lauched Yahoo mail based on RecoketMail technology.

Now Yahoo mail has three domains Yahoo,RocketMail and Ymail.Yahoo take this step to lauch new domains because e-mail demand is growing day by day.

So,now just create e-mail address in yahoo as you wish.

FireFox 3 Shortcuts

FireFox 3 Tips and tricks (keyboard shortcuts) to improve performance.

For Zoom In : Ctrl + "+"

For Zoom Out : Ctrl + "-"

Open a new empty tab : Ctrl + T

Close a tab : Ctrl + W

Reopen a Closed tab : Ctrl + Shift + T

Move cursor to the location bar : Ctrl + L

Move cursor to the search box : Ctrl + K

Scroll down the page : "Space Bar"

Scroll up the page : Shift + "Space Bar"

Refresh the page : Ctrl + R

Back : Alt + "<-"

Forward : Alt + "->"

Friday, June 20, 2008

Joshua Schacter,Delicious founder leaves Yahoo

Joshua Schacter who is Delicious founder leaves Yahoo.Delicious is social-bookmarking website and which is acquired by Yahoo in 2005.

Recently,Yahoo released Delicious plug-in for Internet Explorer.

Delicious plug-in for Internet Explorer

Yahoo released a version of its Delicious plug-in for Internet Explorer (Delicious Bookmarks Add-on for Internet Explorer).

This extension works with XP and Vista for IE6 and IE7. IE8 should also work, but IE8 support is still in beta, since that browser isn’t final.

For more details on the IE extension, check out our original beta announcement. For the eager and impatient, download from our website.

Download and Enjoy!

World population 7 billion in 2012

The world's population will reach 7 billion in 2012, even as the global community struggles to satisfy its appetite for natural resources, according to a new government projection.

There are 6.7 billion people in the world today. The United States ranks third, with 304 million, behind China and India, according to projections released Thursday by the Census Bureau.

The world's population surpassed 6 billion in 1999, meaning it will take only 13 years to add a billion people.

Tuesday, June 17, 2008

Apple iPhone secret phone codes

*3001#12345#* and tap Call. Enter Field Mode.

Field mode reveals many of the inner settings of your iPhone, specifically up-to-date network and cell information.
*#06# Displays your IMEI. No need to tap Call.

IMEI is the unique identifier for your cell phone hardware. Together with your SIM information it identifies you to the provider network.
*777# and tap Call. Account balance for prepaid iPhone.

*225# and tap Call. Bill Balance. (Postpaid only)

*646# and tap Call. Check minutes. (Postpaid only)

These three are pretty self explanatory.
*#21# and tap Call. Setting interrogation for call forwards.

Discover the settings for your call forwarding. You'll see whether you have voice, data, fax, sms, sync, async, packet access, and pad access call forwarding enabled or disabled.
*#30# and tap Call. Calling line presentation check.

This displays whether you have enabled or disabled the presentation of the calling line, presumably the number of the party placing the call.
*#76# and tap Call. Check whether the connected line presentation is enabled or not.

State whether the connected line presentation is enabled or disabled. Presumably similar to the calling line presentation.
*#43# and tap Call. Determine if call waiting is enabled.

Displays call waiting status for voice, data, fax, sms, sync data, async data, packet access and pad access. Each item is either enabled or disabled.
*#61# and tap Call. Check the number for unanswered calls.

Show the number for voice call forwarding when a call is unanswered. Also show the options for data, fax, sms, sync, async, packet access and pad access.
*#62# and tap Call. Check the number for call forwarding if no service is available.

Just like the previous, except for no-service rather than no-answer situations.
*#67# and tap Call. Check the number for call forwarding when the iPhone is busy.

And again, but for when the iPhone is busy.
*#33# and tap Call. Check for call control bars.

Check all the usual suspects (voice, data, fax, sms, etc) to see whether barring is enabled or disabled for outgoing.

Mozilla : FireFox 3

Mozilla plans to release Firefox 3 on Tuesday , 17 June 2008.

Firefox 3 Release Candidate 3 is available in more than 45 languages as a public preview release intended for developer testing and community feedback.

Features in FireFox 3 (What's New in Firefox 3)

->One-click site info
->Malware Protection
->New Web Forgery Protection page
->New SSL error pages
->Anti-virus integration
->Secure add-on updates
->Add-ons and Plugin version check
->Full page zoom
->New Download Manager
->Save what you were doing
->Text selection improvements: multiple text selections can be made with Ctrl/Cmd; double-click drag selects in "word-by-word" mode; triple-clicking selects a paragraph.

And many more very useful features. For more Feature FireFox 3.Just Download FireFox 3 and enjoy it.

Wednesday, May 28, 2008

Site Navigation using SiteMapPath control in ASP.Net 2.0

This article explains how to do site navigation for your web site

Introduction 2.0 has cool control for site navigation is SiteMapPath control.You can find SiteMapPath control in the Toolbox under the Navigation category.Using this control you can find where are you in this website.
First Add Web.sitemap in your project.Web.Sitemap has Title,Url and description this,

Site Map

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="" >
<siteMapNode url="~/Default.aspx" title="Home" description="Home">
<siteMapNode url="~/InsideUs.aspx" title="Inside Us" description="">
<siteMapNode url="~/VisionMission.aspx" title="Vision & Mission" description=""/>
<siteMapNode url="~/Culture.aspx" title="Culture" description=""/>
<siteMapNode url="~/Trust.aspx" title="Trust" description=""/>
<siteMapNode url="~/BusinessPriciples.aspx" title="Business Principles" description=""/>
<siteMapNode url="~/contactus.aspx" title="Contact US" description="Contact US"/>
<siteMapNode url="~/aboutus.aspx" title="About Us" description="About Us"/>

Master Page for the application

Now add the master page in your project and then drag and drop the SiteMapPath this,

<asp:SiteMapPath ID="SiteMapPath1" runat="server" Font-Names="Verdana" Font-Size="0.8em" PathSeparator=" : ">
<PathSeparatorStyle Font-Bold="True" ForeColor="#5D7B9D" />
<CurrentNodeStyle ForeColor="#333333" />
<NodeStyle Font-Bold="True" ForeColor="#7C6F57" />
<RootNodeStyle Font-Bold="True" ForeColor="#5D7B9D" />

The SiteMapPath control will automatically bind itself to the Web.sitemap file.If you use default SiteMap provider will

automatically be used by SiteMapPath control and also you can set the SiteMapProvider property of SiteMapPath control.

Now when you are on Culture.aspx page then SiteMapPath control display like, Home : Inside Us : Culture
So you can easily go from "Culture" page to "Home" page or "Inside Us" page (root node) using SiteMapPath Control.

Here,I set PathSeparator property of SiteMapPath control to : by default is >.

PathDirection property use for in which direction you want to display link.CurrentToRoot display link start from current node to Parent node like Culture : Inside Us : Home.And other is RootToCurrent display link start from Parent node to Current node like Home : Inside Us : Culture.

How to create Menu based on Sitemap and Roles

The following code sample shows how to create Menu based on Sitemap and Roles.

The combination of ASP.NET role management and ASP.NET URL authorization provide
a way to restrict access to Web files based on security roles.

Security trimming is a very cool feature which allows you to hide the urls based
on the users roles.

First create Web.sitemap in website also add roles for access url.

<?xml version="1.0" encoding="utf-8" ?>

<siteMap xmlns="" >
<siteMapNode url="~/Default.aspx" title="Home" description="Home">
<siteMapNode url="~/contactus.aspx" title="Contact US" description="Contact US" />
<siteMapNode url="~/aboutus.aspx" title="About Us" description="About Us" roles="*"/>
<siteMapNode url="~/articles.aspx" title="Articles" description="Articles"/>
<siteMapNode url="~/admin.aspx" title="Admin" description="Articles" roles="Admin"/>

In above site admin.aspx is display only to person who has Admin role.and roles
"*" means display for everyone.

Now,define sitemap providers in web.config file and enable security trimming

(securityTrimmingEnabled is set to true ).

<siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
<providers> <add name="UserMenuSiteMap" description="Used for Menu"
type="System.Web.XmlSiteMapProvider" siteMapFile="Web.siteMap" securityTrimmingEnabled="true"/>

Menu based on Sitemap

For creating menu based on sitemap,Firstly create Web.sitemap (Define Sitemap).Web.Sitemap has Title,Url and description attributes.

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="" >
<siteMapNode url="~/Default.aspx" title="Home" description="Home">
<siteMapNode url="~/contactus.aspx" title="Contact US" description="Contact US"/>
<siteMapNode url="~/aboutus.aspx" title="About Us" description="About Us"/>
<siteMapNode url="~/articles.aspx" title="Articles" description="Articles"/>

Then,in master page or .aspx drag and drop control and SiteMapDataSource.And set menu DataSourceID property to SiteMapDataSource.

<asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1" Font-Names="Verdana"
Font-Size="0.8em" ForeColor="#7C6F57" Orientation="Horizontal" StaticSubMenuIndent="10px"
BackColor="#F7F6F3" DynamicHorizontalOffset="2" StaticDisplayLevels="2"></asp:Menu>

<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />

When you required Horizontal or Vertical menu then just set Orientation property of menu.By default this property set to Vertical.

In code we use DynamicHorizontalOffset property of menu to Gets or sets the number of pixels to shift a dynamic menu horizontally relative to its parent menu item.

In code we use StaticDisplayLevels property of menu to specify the number of menu levels to display in a static menu.

Find Nth highest salary from table

In interview you can faced question like to give solution(query) for find Nth highest salary from given employee table.

TO find out 3rd highest salary from table

--Find 3rd highest salary
SELECT TOP 1 salary
FROM tblSalary
ORDER BY salary

General form to find to Nth highest salary from table

--Find Nth highest salary
SELECT TOP 1 salary FROM (
ORDER BY salary

There are many solution to solve to this but above solution is easiest.
Take other possible solution,

SELECT MIN(salary) FROM tblSalary WHERE salary IN
(SELECT DISTINCT TOP 3 salary FROM tblSalary ORDER BY salary DESC)


(SELECT DISTINCT TOP 3 salary FROM tblSalary ORDER BY salary DESC) S

Thursday, April 3, 2008

LINQ Introduction

Language Integrated Query (LINQ), a new query language feature in .net 3.5.

You can use it to retrieve data from an array or collection or any data source that supports IEnumerable or IQueryable.

Let's see example how to use LINQ in string array.We have string array of country like this,

Dim countries As String() = {"Australia", "Brazil", "China", "Japan", "India", "United States", "United Kingdom"}
Dim data = From country In countries Where country.StartsWith("Uni") Select country.ToUpper
Response.Write("Country List</br">")
For Each country As String In data
Response.Write(country & "</br">")

Here, you have only change "LINQ Query" with query that discuss below.

==> By using LINQ you can retrive data from array. Below LINQ equivalent to SELECT * statement of SQL Server.

From country In countries Select country

==> You can also use conditional statement in array to get data.To retrive country list that have string length less than 6.

From country In countries Where country.Length < 6 Select country

==> You can also sort an array Ascending/Descending.

From country In countries Order By country Descending Select country

==> To retrive Country name that start with "UNI" and country name in Upper case.

From country In countries Where country.StartsWith("Uni") Select country.ToUpper

Here, I have explain how use LINQ.

Tuesday, February 26, 2008

Enable/Disable RequiredFieldValidator with Javascript

Sometimes we need to Enable or Disable validation on client side.For that use ValidatorEnable function in the javacsript Script Library.

For that set EnableClientScript property of validator to True.

Here i give example for this:

I have a page with a couple of radio buttons.On radio button selection i want to enable/disable validation.

In example if i select Email radio button then Email div will display and only txtEmail textbox validator is enabled.

Java Script for this:

<script language="JavaScript" type="text/javascript">
function autoSelect(control,type)
ValidatorEnable(document.getElementById("RequiredFieldValidator1"), true);
ValidatorEnable(document.getElementById("RequiredFieldValidator2"), false);

ValidatorEnable(document.getElementById("RequiredFieldValidator1"), false);
ValidatorEnable(document.getElementById("RequiredFieldValidator2"), true);

Code for this:

Email :
<input type="radio" id="RadioButton1" runat="server" value="Plan1" name="Plan" onclick="autoSelect(this,'Email')" checked />
PhoneNo :
<input type="radio" id="RadioButton2" runat="server" value="Plan1" name="Plan" onclick="autoSelect(this,'PhoneNo')" />
<div id="Email">
Email <asp:TextBox ID="txtEmail" runat="server" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Email Required"
ControlToValidate="txtEmail" EnableClientScript="true" ValidationGroup="vgSubmit" />
<div id="PhoneNo" style="display:none">
PhoneNo <asp:TextBox ID="txtPhoneNo" runat="server" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="PhoneNo Required"
ControlToValidate="txtPhoneNo" EnableClientScript="true" ValidationGroup="vgSubmit"/>
<asp:Button ID="btnSubmit" runat="server" Text="Button" ValidationGroup="vgSubmit"/>

Tuesday, January 22, 2008

DateTime Formatting in GridView,DetailView,FormView

In Asp.Net 2.0 direct datetime formatting for bound column not possible.

To format column into datatime you have to set HtmlEncode="False" property of BoundField.

The Reason behind for this is bydefault data is Html Encoded that prevents to format date.So, set HtmlEncode to False.

Saturday, January 5, 2008

File Download dialog box

Code to open a "save as.." file download dialog box in 2.
Here,I create a function for to open file download dialog box.

Use System.IO class for file system. Function argument accepts a File virtual path not physical path.

This code for only .txt file but you also use this code for more extension file.For that change only ContentType.

.htm,.html => "text/HTML"
.txt => "text/plain"
.doc,.rtf => "Application/msword"
.csv,.xls => "Application/x-msexcel"
.pdf =>"Application/pdf"

Function DisplayDownloadDialog(ByVal PathVirtual As String)

Dim strPhysicalPath As String
Dim objFileInfo As System.IO.FileInfo
strPhysicalPath = Server.MapPath(PathVirtual)
'exit if file does not exist
If Not System.IO.File.Exists(strPhysicalPath) _
Then Exit Function
objFileInfo = New System.IO.FileInfo(strPhysicalPath)

'Add Headers to enable dialog display
Response.AddHeader("Content-Disposition", "attachment; filename=" & _
Response.AddHeader("Content-Length", objFileInfo.Length.ToString())

Response.ContentType = "Text / plain"


'on exception take no action
'you can implement differently


End Try
End Function