Friday, September 19, 2008

Convert < and > to & lt; and & gt;

If you're trying to display HTML or XML tags on a web page, like in my previous post, most web publishing systems will swallow up the tags and the output will not be what you expect.

I came across this nice web converter that converts the < to & lt; and the > to & gt; allowing your content to remain unmangled.

How to encode double quotes and newlines inside a C# string

It turns out that this is not as easy as it seems. The syntax is kludgy. I found the answer on Gus Perez's blog

Imagine that you want this literal string in your C# code:
<GC xmlns:dt="urn:schemas-microsoft-com:datatypes">
<pInLotIDs x:dt="list">
<item dt:dt="string">108P091G-000</item>
</pInLotIDs>
</GC>


Then you have to code this in C# as:


string sInputData = @"
<GC xmlns:dt=""urn:schemas-microsoft-com:datatypes"">
<pInLotIDs CSIM:dt=""list"">
<item dt:dt=""string"">108P091G-000</item>
</pInLotIDs>
</GC>


Ugh!

Tuesday, September 16, 2008

ASP.NET tutorials

I have been learning ASP.NET using Visual Web Developer 2008 Express Edition. Along the way, I came across this structured set of ASP.NET tutorials at DotNetSpider. I want to give them a plug - although the tutorials could be polished some, they are very easy to follow and build up slowly on a good fundamental base. I am halfway through them right now.

I also like Visual Web Developer 2008 Express Edition - it is free to download, use and distribute applications.

My first blog post

I've really created this blog so that I can get an OpenID. This will allow me to log in to a promising new web site for programmers called StackOverflow. Check them out!