Friday, November 26, 2010

What is other use of Go statement in TSQL?

I will explain you this with an Example.


CREATE TABLE dbo.TEST (ID INT IDENTITY (1,1), ROWID uniqueidentifier)
GO
INSERT INTO dbo.TEST (ROWID) VALUES (NEWID()) 
GO 1000

Note Second Go 1000.  This will insert 1000 row to table test.

Tuesday, November 23, 2010

Show tooltip text in gridview row on mouseover.

This Code segment explains, How to show tooltip text in gridview row on mouseover from Code behind

C# Code
protected void GridView_RowDataBound(Object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType e == DataControlRowType.DataRow)
{
//ShowToolTip
e.Row.ToolTip = "This text needs to shown on mouseover of the row!";
}
}

VB.NET
protected sub GridView_RowDataBound(ByVal sender As Object, e as GridViewRowEventArg)
if e.Row.RowType e = DataControlRowType.DataRow then
'ShowToolTip
e.Row.ToolTip = "This text needs to shown on mouseover of the row!";
End if
End Sub

How to Call print Dialog Box from JavaScript.

The Code segment show you, How to call print Dialog Box from JavaScript.

It is Very Simple, Just call window.print() function from java script
See Sample below…



<a href="JavaScript:window.print();">
<img src="set the image name" border="0"
width="17" height="17" align="middle" alt="Print Version" />
</a>