Search This Blog

Sunday, October 23, 2011

http://www.ajaxload.info/#preview

http://www.ajaxload.info/#preview

why does an AutocompleteExtender get refreshed at given interval?

AutocompleteExtender get refreshed at given interval when its EnableCaching is set to false.Set it to true to stop it.

Wednesday, October 5, 2011

how to use Sql Server Profiler

Microsoft SQL Server Profiler is a graphical user interface to SQL Trace for monitoring T-SQL Statements of Database Engine. We can save and reuse the state at a later point of time.

•We can do the following using SQL Server Profiler
    ◦Create a trace
    ◦Watch the trace results as the trace runs
    ◦Store the trace results in a table
    ◦Start, stop, pause, and modify the trace results as necessary
    ◦Replay the trace results
•Use SQL Server Profiler to monitor only the events in which you are interested

How To Start SQL Profiler
>In Sql Server 2000
    Start | Run | profiler | OK
>In Sql Server 2005
    Start | All Programs | Microsoft SQL Server 2005 | Performance Tools | SQL Server Profiler.

Saturday, October 1, 2011

Integer Displaying as Hexadecimal When Debugging in Visual Studio.

If you Integers are displaying as hexadecimals (funny letters) then you've probably switched on the hexadecimal display option in your watch window.

You need to debug a project, open up the watch window: Debug > Windows > Watch 1 then right click on an entry and untick 'hexidecimal display'

Thursday, September 29, 2011

How to use GridViewDataRow with html contents.

If datasource(datatable) has html contents and bind this datasource to the gridview.
The GridView will show the data as it is in datatable.It means it will show the html content as it is.
For Example:
Your DataTable has html content "<Strong>Testing</Strong>" but gridview display same "<Strong>Testing</Strong>" instead of "Testing".

Solution:

Add the following code into gridView's Rowdatabound event.

protected void GridView_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
foreach (TableCell cell in e.Row.Cells)
{
cell.Text = Server.HtmlDecode(cell.Text);
}
}

Tuesday, September 27, 2011

How to swap column value of a sql table.

Create Table tmp (A varchar(10),B VARCHAR(10))


insert into tmp values('a','1')
insert into tmp values('b','2')
insert into tmp values('v','3')

Select * from tmp

output
A B
a 1
b 2
v 3

Update #tmp Set A=B, B=A

Select * from tmp
swapped output
A B
1 a
2 b
3 v

Sunday, September 25, 2011

Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list

This error comes when you are trying to access iis7.0 or upgraded and iis is not register for asp.net.
Solution:Register IIS with ASPNET4.0 as follows......

c:\windows\microsoft.net\framework\v4.0.30319>aspnet_regiis -i