Month: August 2007

C# Quicknote: stripping html tags from a string

No Picture

Below is a simple regex statement that I have been using to string html tags from a string: string result = Regex.Replace(input, @”<(.|n)*?>”, string.Empty);

Read More »

SharePoint 2007: Escaping URLs for CTX object

No Picture

I keep coming across URLs in the following format \u002fmyweb\u002fshared\u002520Documents (especially within ctx JavaScript objects). To encode URLs in this format, use the following function (note you will need to refer to the Microsoft.SharePoint.Utilities namespace):public string EscapeUrlForCtx(string inputUrl){string…

Read More »

SQL Server: Output keyword with the Enterprise Lib

No Picture

Below are some examples of using stored procedures containing the output keyword in SQL server 2005. Being a SharePoint developer, I don’t normally need to do SQL programming, hence I am blogging this so that I’ve got it…

Read More »