devxlogo

DevX

Tip: The sp_rename SQL Stored Procedure

You can not use the ALTER TABLE statement in SQL Server to rename a column in a table. You can however, use the sp_rename stored procedure if you do not

Tip: Get the DNS Name from an HttpRequest in C#

Use the GetLeftPart method on the HttpRequest’s URI with Authority as the UriPartial’s value to retrieve the DNS Name. string dnsName = HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority); ? Visit the DevX Tip Bank ?

Tip: Count the Number of Active ASP.NET Sessions

During testing or monitoring, there is a constant need to monitor the number of sessions created, so as to better correlate the performance metrics collected. The Performance Monitor tool is