How to resolve collation conflicts in Microsoft SQL Server 2008 stored procedure

To resolve collation conflicts like: Msg 468, Level 16, State 9, Line 135 Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation. You should surround the ‘=’ with collate database_default select * from Product p inner join Sales s where p.Name collate database_default = s.ProductName …

Simplest way to detect session timeout in an asp .net 2.0 web application in C#

The simplest way to detect if a session timeout occurred in an asp .net 2.0 web application use Global.asax Session_Start and Page_Load event. see: http://blogs.msdn.com/nikhiln/archive/2007/06/21/detecting-session-timeout-in-asp-net-2-0-web-applications.aspx   Using Session["xxx"] value to determine the session timeout: This is a "quick and dirty" hack that can be introduced into an application to figure …