Monday, November 12, 2007
Microsoft Search Server 2008
Thursday, November 1, 2007
Resolve relative url's without ResolveUrl
The System.Web.VirtualPathUtility class has some very useful method for converting from an app relative path to an absolute path:
string absoluteUrl = VirtualPathUtility.ToAbsolute(relativeUrl);
Can't Play Windows media files in IE 7 and VISTA
Here is the solution
Open IE7 > Tools > Internet Options
Click on the "Programs" tab
Click on the "Set Programs" button
Click the "Set program access and computer defaults" link
Click the "Custom" option
Go down to the "Choose a default media player:" option and select "Windows Media Player"
Click the "Ok" button
Close "Default Programs" window
Click the "Ok" button on the "Internet Options" window
Monday, October 29, 2007
?? operator (C#)
The ?? operator returns the left-hand operand if it is not null, or else it returns the right operand. For example:
int? x = null;
...
// y = x, unless x is null, in which case y = -1.
int y = x ?? -1;
The ?? operator also works with reference types:
//message = param, unless param is null
//in which case message = "No message"
string message = param ?? "No message";