Tuesday, August 01, 2006
Javascript - Strpping CrLf
I've just been hunting round the internet for this so I thought Id share! This is a simple function to remove the CrLf characters from a string (Handy if you're receiving HTML in a Javascript variable and you want a HTML <BR/> instead) . Simply add the following to the end of your variable and all will be well! .replace(/(\r\n)/g, "<br/>"); ...
Tuesday, July 11, 2006
ASP.NET Web.Config from IIS
Just a little tip for those that dont like hacking the XML in web.config on ASP.NET 2.0 projects manually theres a handy little tool built into IIS: If you right click on the website in IIS then click properties then go to the ASP.NET tab theres a button at the bottom called Edit Configuration, if you go in there theres a nice little interface for the web.config file which...
Tuesday, July 04, 2006
RSS XML Stylesheet Example
Some time ago I was working for a client who required their CMS system to output particular items as RSS feeds. The CMS output XML and used XSLT to tranform to HTML. This provided a very handy mechanism indeed for conversion to RSS. My final solution used a stylesheet to simply take the XML from the CMS and convert it to an RSS 2.0 format feed rather than HTML! Below...
XSLT Replace Template
I was working on a site today that required me to split a string in the form of a=1;b=2;c=3 in xsl. Now xsl does provide a translate() function but it doesn't traverse the whole string doing a normal replacement as you might expect. Instead a trawled the internet and found the following little template which nicely recurses through and does the replacement. I thought I'd post...
Monday, July 03, 2006
Email Blog Entry
Again Im new to all this blogging lark and now Ive had it for a while I thought I'd checkout some of the extended capabilities - like emailing in this entry! See you all again soon! Oh I've also allowed comments from everyone (not just registered users) so lets see if we can get some kinda flame ware on the go eh? ;oP ...
Enmus, Enum Sets, parsing n' stuff
Recently I have started keeping track of some industry leading developers and what they're up to via their weblogs. One very active blogger is Rick Strahl who really knows his stuff - anyway todya I noticed he'd posted a very good guide to using Enum's - far far superior to my one liner about recursing through them so I thought Id post a link here and share!http://west-wind.com/w...
Tuesday, June 27, 2006
Real Japanese Name!
Ok so I was bored and thought this was erm...cool?My japanese name is 黒田 Kuroda (black field) 海斗 Kaito (big dipper of the ocean).Take your real japanese name generator! today!Created with Rum and Monkey's Name Generator Generato...
Thursday, June 22, 2006
foreach Item in Enumerator?!
This is just a quick snippet but the other day I was trying to do a foreach thru an Enumerator, after a llittle tinkering and enquiry with our resident guru I was provided with this nasty looking bit of code that works like a charm - basically all it does is push the contents of the Enum into an Array, Array supporting the IEnumerable interface of course makes it easy to foreach thru!Array...
Subscribe to:
Posts (Atom)