<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>String Writer</title>
	<atom:link href="http://stringwriter.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://stringwriter.com</link>
	<description>my tech stuffs...</description>
	<lastBuildDate>Wed, 18 Apr 2012 21:09:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='stringwriter.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/4fef7423b8f967490fa733ef6a01be3d?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>String Writer</title>
		<link>http://stringwriter.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://stringwriter.com/osd.xml" title="String Writer" />
	<atom:link rel='hub' href='http://stringwriter.com/?pushpress=hub'/>
		<item>
		<title>Get TcmId from web dav url</title>
		<link>http://stringwriter.com/2012/01/10/get-tcmid-from-web-dav-url/</link>
		<comments>http://stringwriter.com/2012/01/10/get-tcmid-from-web-dav-url/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 23:52:43 +0000</pubDate>
		<dc:creator>visvabalaji</dc:creator>
				<category><![CDATA[SourceCode]]></category>
		<category><![CDATA[Tridion]]></category>
		<category><![CDATA[WebDAV]]></category>

		<guid isPermaLink="false">http://stringwriter.com/?p=447</guid>
		<description><![CDATA[Many of tridion developer would have tried to get tcm id from web dav. This might be one of the common scenarios where we are using web dav when we are rendering embedded components (in another component template). I think this is simple scenario so I&#8217;m just sharing C# code snippet for this. I&#8217;m posting [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringwriter.com&amp;blog=2738155&amp;post=447&amp;subd=visvabalaji&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Many of tridion developer would have tried to get tcm id from web dav. This might be one of the common scenarios where we are using web dav when we are rendering embedded components (in another component template).</p>
<p>I think this is simple scenario so I&#8217;m just sharing C# code snippet for this. I&#8217;m posting this snippet becoz somebody was googling this yesterday <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ))</p>
<p><pre class="brush: csharp;">

IdentifiableObject identifiableObject = engine.GetObject(&quot;&lt;&lt;Web dav url&gt;&gt;&quot;);
package.PushItem(&quot;TCMID&quot;, package.CreateStringItem(ContentType.Text, identifiableObject.Id));

</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/visvabalaji.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/visvabalaji.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/visvabalaji.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/visvabalaji.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/visvabalaji.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/visvabalaji.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/visvabalaji.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/visvabalaji.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/visvabalaji.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/visvabalaji.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/visvabalaji.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/visvabalaji.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/visvabalaji.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/visvabalaji.wordpress.com/447/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringwriter.com&amp;blog=2738155&amp;post=447&amp;subd=visvabalaji&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stringwriter.com/2012/01/10/get-tcmid-from-web-dav-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c56817ed9984d16b3f4dd7e8afc4a5ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">visvabalaji</media:title>
		</media:content>
	</item>
		<item>
		<title>Dreaweaver templating in Tridion</title>
		<link>http://stringwriter.com/2011/11/28/dreaweaver-templating-in-tridion/</link>
		<comments>http://stringwriter.com/2011/11/28/dreaweaver-templating-in-tridion/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 23:27:36 +0000</pubDate>
		<dc:creator>visvabalaji</dc:creator>
				<category><![CDATA[Tridion]]></category>
		<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[DWT]]></category>
		<category><![CDATA[Templating]]></category>

		<guid isPermaLink="false">http://stringwriter.com/?p=421</guid>
		<description><![CDATA[Unless we are familiar with XSLT, I believe, most of us would prefer developing Dreamweaver TBB (DWT) for CT/PT layout! So just thought of sharing basic Dreamweaver syntax which are commonly used anyway. There are few Dreamweaver extensions are available, developed by Tridion Community, to simplify and enhance DWT templating. But I didn’t get a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringwriter.com&amp;blog=2738155&amp;post=421&amp;subd=visvabalaji&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Unless we are familiar with XSLT, I believe, most of us would prefer developing Dreamweaver TBB (DWT) for CT/PT layout!</p>
<p>So just thought of sharing basic Dreamweaver syntax which are commonly used anyway. There are few Dreamweaver extensions are available, developed by Tridion Community, to simplify and enhance DWT templating. But I didn’t get a chance to work on these extensions. So below code syntax would work without any DWT extensions.</p>
<p>I’ve created few simple building blocks for this DWT example.</p>
<h3> Schema &amp; Component</h3>
<p>Below is the sample content created based on a simple schema. So assume that component will have this below content.</p>
<p><pre class="brush: xml;">
&lt;Blog xmlns=&quot;uuid:18db19ea-b584-4f97-9ac6-8a6e269c9f60&quot;&gt;
				&lt;Author&gt;
					&lt;Name&gt;Thotta&lt;/Name&gt;
					&lt;TwitterHandle&gt;thotta&lt;/TwitterHandle&gt;
					&lt;Genere&gt;Tamil&lt;/Genere&gt;
				&lt;/Author&gt;
				&lt;Title&gt;TwiTamils&lt;/Title&gt;
				&lt;Body&gt;This post is to discuss about active twitters.&lt;/Body&gt;
				&lt;Tweeters&gt;
					&lt;Name&gt;Sathish&lt;/Name&gt;
					&lt;TwitterHandle&gt;sathm&lt;/TwitterHandle&gt;
					&lt;Genere&gt;Tamil&lt;/Genere&gt;
				&lt;/Tweeters&gt;
				&lt;Tweeters&gt;
					&lt;Name&gt;Nuno&lt;/Name&gt;
					&lt;TwitterHandle&gt;nunolinhares&lt;/TwitterHandle&gt;
					&lt;Genere&gt;Tridion&lt;/Genere&gt;
				&lt;/Tweeters&gt;
				&lt;Tweeters&gt;
					&lt;Name&gt;Sowbarnika&lt;/Name&gt;
					&lt;TwitterHandle&gt;sowmi_&lt;/TwitterHandle&gt;
					&lt;Genere&gt;Tamil&lt;/Genere&gt;
				&lt;/Tweeters&gt;
				&lt;Tweeters&gt;
					&lt;Name&gt;Srinivasan&lt;/Name&gt;
					&lt;TwitterHandle&gt;DKCBE&lt;/TwitterHandle&gt;
					&lt;Genere&gt;Tamil&lt;/Genere&gt;
				&lt;/Tweeters&gt;
				&lt;Tweeters&gt;
					&lt;Name&gt;Alvin Reyes&lt;/Name&gt;
					&lt;TwitterHandle&gt;Nivlong&lt;/TwitterHandle&gt;
					&lt;Genere&gt;Tridion&lt;/Genere&gt;
				&lt;/Tweeters&gt;
			&lt;/Blog&gt;
</pre></p>
<p>And the component layout is defined in DWT as follows</p>
<p><pre class="brush: xml;">
&lt;div&gt;
&lt;h1&gt;@@Component.Fields.Title@@&lt;/h1&gt;
 by &lt;a href=&quot;twitter.com/@@Component.Fields.Author.TwitterHandle@@&quot;&gt;@@Component.Fields.Author.Name@@&lt;/a&gt;
 @@Component.Fields.Body@@
&lt;hr /&gt;
&lt;table border=&quot;1&quot;&gt;
 &lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;Tweeters&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;&lt;strong&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;Tamil Tweeters&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
  &lt;td&gt;
   &lt;ul&gt;
     &lt;li&gt;&lt;strong&gt;&lt;a href=&quot;twitter.com/@@TwitterHandle@@&quot;&gt;@@Name@@&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
   &lt;/ul&gt;
   &lt;ul&gt;
	&lt;li&gt;&lt;em&gt;&lt;a href=&quot;twitter.com/@@TwitterHandle@@&quot;&gt;@@Name@@&lt;/a&gt;&lt;/em&gt;&lt;/li&gt;
   &lt;/ul&gt;
  &lt;/td&gt;
  &lt;td&gt;
   &lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;twitter.com/@@TwitterHandle@@&quot;&gt;@@Name@@&lt;/a&gt;&lt;/li&gt;
   &lt;/ul&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;/table&gt;
&lt;/div&gt;

</pre></p>
<p>Using template builder, we would need to execute this component template against the above component and that would render the output as,</p>
<h1>TwiTamils</h1>
<p>by<br />
<a href="twitter.com/thotta">Thotta</a></p>
<p>This post is to discuss about active twitters.</p>
<hr />
<table border="1">
<tbody>
<tr>
<td><strong><span style="text-decoration:underline;">Tweeters</span></strong></td>
<td><strong><span style="text-decoration:underline;">Tamil Tweeters</span></strong></td>
</tr>
<tr>
<td>
<ul>
<li><strong><a href="twitter.com/sathm">Sathish</a></strong></li>
<li><em><a href="twitter.com/nunolinhares">Nuno</a></em></li>
<li><strong><a href="twitter.com/sowmi_">Sowbarnika</a></strong></li>
<li><em><a href="twitter.com/DKCBE">Srinivasan</a></em></li>
<li><strong><a href="twitter.com/Nivlong">Alvin Reyes</a></strong></li>
</ul>
</td>
<td>
<ul>
<li><a href="twitter.com/sathm">Sathish</a></li>
<li><a href="twitter.com/sowmi_">Sowbarnika</a></li>
<li><a href="twitter.com/DKCBE">Srinivasan</a></li>
</ul>
</td>
</tr>
</tbody>
</table>
<hr />
<h5>Accessing a field value</h5>
<p>There are many ways to retrieve the field of a component : @@Component.Fields.&lt;<em>field name</em>&gt;@@ or @@&lt;<em>field name</em>&gt;@@ or ${<em>field name</em>}.</p>
<p>Calling simply the field name, like @@Title@@, would work but we should be clear that the same field name was not used on CT/PT level. Otherwise it would return title of the component template since Title is the default attribute for Component Template also.</p>
<p>It&#8217;s always better to use full path like @@Component.Fields.Title@@.</p>
<h5> Accessing sub field&#8217;s value</h5>
<p>If embedded schema&#8217;s field needs to be accessed, we can extend the call by adding the sub field name.</p>
<p>As you can see in the above component xml source of a component, Name is the sub field of Author. So it can be accessed like</p>
<p>@@Component.Fields.Author.Name@@</p>
<h5> Accessing a value from Collection</h5>
<p>If there are any collection of fields, that can be looped using TemplateBeginRepeat. In the above content, Tweeters is the collection , the sub fields can be accessed inside the loop.</p>
<p><pre class="brush: xml;">

&lt;!-- TemplateBeginRepeat name=&quot;Component.Fields.Tweeters&quot; --&gt;
   Name: @@Name@@
   Handle : @@TwitterHandle@@
&lt;!-- TemplateEndRepeat --&gt;
</pre></p>
<p>Please note that the sub fields cannot be called like Component.Fields.Tweeters.Name as it cannot navigate right through the Component.</p>
<p>I wish to have something like Component.Fields.Tweeters[0].Name … Component.Fields.Tweeters[3].Name… but unfortunately, it won’t work <img src='http://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<h5> Getting loop index</h5>
<p>When we are iterating a collection, obviously we would require to have an index of the loop. Unlike other languages, we can’t declare any variables here but Dreamweaver provides a default variable (<em>TemplateRepeatIndex</em>) which holds the index value of the loop.</p>
<p>@@ TemplateRepeatIndex@@ -&gt; this will print the index value on the page.</p>
<h5> Conditional loop</h5>
<p>Dreamweaver also provides conditional loop which is similar to If conditions in other languages.</p>
<p><pre class="brush: xml;">

&lt;!-- TemplateBeginIf cond=&quot;conditions&quot; --&gt;
  ….
&lt;!-- TemplateEndIf --&gt;

</pre></p>
<p>For example,</p>
<p>If I want to render a footer component on bottom of the page, we can try something like</p>
<p><pre class="brush: xml;">

&lt;!-- TemplateBeginRepeat name=&quot;Components&quot; --&gt;
   &lt;!-- TemplateBeginIf cond=&quot;ComponentTemplate.Metadata.Position = 'Footer'&quot; --&gt;
     @@RenderComponentPresentation(Component.ID, ComponentTemplate.ID)@@
   &lt;!-- TemplateEndIf --&gt;
&lt;!-- TemplateEndRepeat --&gt;

</pre></p>
<p>Hope this helps for beginners!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/visvabalaji.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/visvabalaji.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/visvabalaji.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/visvabalaji.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/visvabalaji.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/visvabalaji.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/visvabalaji.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/visvabalaji.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/visvabalaji.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/visvabalaji.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/visvabalaji.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/visvabalaji.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/visvabalaji.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/visvabalaji.wordpress.com/421/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringwriter.com&amp;blog=2738155&amp;post=421&amp;subd=visvabalaji&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stringwriter.com/2011/11/28/dreaweaver-templating-in-tridion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c56817ed9984d16b3f4dd7e8afc4a5ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">visvabalaji</media:title>
		</media:content>
	</item>
		<item>
		<title>Publication URL TBB</title>
		<link>http://stringwriter.com/2011/11/22/publication-url-tbb/</link>
		<comments>http://stringwriter.com/2011/11/22/publication-url-tbb/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 21:49:19 +0000</pubDate>
		<dc:creator>visvabalaji</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[SourceCode]]></category>
		<category><![CDATA[Tridion]]></category>
		<category><![CDATA[TOM.Net]]></category>

		<guid isPermaLink="false">http://stringwriter.com/?p=410</guid>
		<description><![CDATA[In most cases, you will not be publishing the binary files (images/css/js) in the same location of where you publish pages. As a good practice, these external files will be stored in separate folders. In such cases, you will need to  specify path (relative) in the page DWT template. Generally external css files will be [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringwriter.com&amp;blog=2738155&amp;post=410&amp;subd=visvabalaji&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In most cases, you will not be publishing the binary files (images/css/js) in the same location of where you publish pages. As a good practice, these external files will be stored in separate folders. In such cases, you will need to  specify path (relative) in the page DWT template.</p>
<p>Generally external css files will be declared like</p>
<p><pre class="brush: xml;">
&lt;link href=&quot;/styles/main.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;/&gt;
</pre></p>
<p>This would work only if you have styles folder immediately after server path.</p>
<p><pre class="brush: xml;">
http://&lt;server&gt;/styles/main.css
</pre></p>
<p>In Tridion, default publication URL is &#8220;/&#8221; but if you have specified any path in the Publication,  you will need to append that path also. It should be accessed like.</p>
<p><pre class="brush: xml;">
http://&lt;server&gt;/&lt;pub url&gt;/styles/main.css
</pre></p>
<p>The below C# TBB will get the publication URL of the current publication.</p>
<p><pre class="brush: csharp;">

//gets the current session object
 Session session = engine.GetSession();
 //gets page object from the package
 Item item = package.GetByType(ContentType.Page);
 //gets TcmUri object of Page
 TcmUri tcmObj = new TcmUri(item.GetValue(&quot;ID&quot;));
 //generate tcm string format with publication id
 string publicationId = string.Format(&quot;tcm:0-{0}-1&quot;, tcmObj.PublicationId);
 //gets publication object from the current session
 Publication publication = new Publication(new TcmUri(publicationId), session);
 //writes the publication URL into the package
 package.PushItem(&quot;PublicationUrl&quot;, package.CreateStringItem(ContentType.Text, publication.PublicationUrl));

</pre></p>
<p>As you aware, variable &#8220;PublicationUrl&#8221; will be included in the package so this variable is accessible when you include this TBB on your page template.<br />
Now you need to call this variable on the page DWT like below,</p>
<p><pre class="brush: xml;">
&lt;link href=&quot;@@PublicationUrl@@/styles/main.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;/&gt;
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/visvabalaji.wordpress.com/410/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/visvabalaji.wordpress.com/410/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/visvabalaji.wordpress.com/410/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/visvabalaji.wordpress.com/410/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/visvabalaji.wordpress.com/410/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/visvabalaji.wordpress.com/410/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/visvabalaji.wordpress.com/410/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/visvabalaji.wordpress.com/410/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/visvabalaji.wordpress.com/410/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/visvabalaji.wordpress.com/410/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/visvabalaji.wordpress.com/410/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/visvabalaji.wordpress.com/410/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/visvabalaji.wordpress.com/410/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/visvabalaji.wordpress.com/410/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringwriter.com&amp;blog=2738155&amp;post=410&amp;subd=visvabalaji&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stringwriter.com/2011/11/22/publication-url-tbb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c56817ed9984d16b3f4dd7e8afc4a5ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">visvabalaji</media:title>
		</media:content>
	</item>
		<item>
		<title>C# Algorithms</title>
		<link>http://stringwriter.com/2011/11/01/c-algorithms/</link>
		<comments>http://stringwriter.com/2011/11/01/c-algorithms/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 16:25:38 +0000</pubDate>
		<dc:creator>visvabalaji</dc:creator>
				<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[Algorithm]]></category>

		<guid isPermaLink="false">http://stringwriter.com/?p=407</guid>
		<description><![CDATA[Since I was a developer from the early days, I was always fond of writing algorithms. But I agree that I&#8217;m not an expert in writing algorithms.  But it&#8217;s just my interest to learn it, learn from basics. Since I&#8217;m so interested in mathematics and algorithms, I&#8217;m still having all the materials I&#8217;ve used in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringwriter.com&amp;blog=2738155&amp;post=407&amp;subd=visvabalaji&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Since I was a developer from the early days, I was always fond of writing algorithms. But I agree that I&#8217;m not an expert in writing algorithms.  But it&#8217;s just my interest to learn it, learn from basics. Since I&#8217;m so interested in mathematics and algorithms, I&#8217;m still having all the materials I&#8217;ve used in my school. I&#8217;m so comfortable to refer those materials again as I&#8217;ve already studied them. As usual, C# will be preferred language!</p>
<p>I don&#8217;t know if that&#8217;s gonna help my career. Since I moved to Portal &amp; Content Management stream, I moved away from writing-code phase!  Learning algorithms was my primary objective to start this blog&#8230;! it&#8217;s good that I&#8217;m starting to learn at least now!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/visvabalaji.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/visvabalaji.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/visvabalaji.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/visvabalaji.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/visvabalaji.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/visvabalaji.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/visvabalaji.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/visvabalaji.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/visvabalaji.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/visvabalaji.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/visvabalaji.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/visvabalaji.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/visvabalaji.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/visvabalaji.wordpress.com/407/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringwriter.com&amp;blog=2738155&amp;post=407&amp;subd=visvabalaji&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stringwriter.com/2011/11/01/c-algorithms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c56817ed9984d16b3f4dd7e8afc4a5ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">visvabalaji</media:title>
		</media:content>
	</item>
		<item>
		<title>Could not load the Tomcat server configuration</title>
		<link>http://stringwriter.com/2011/10/05/could-not-load-the-tomcat-server-configuration/</link>
		<comments>http://stringwriter.com/2011/10/05/could-not-load-the-tomcat-server-configuration/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 17:47:46 +0000</pubDate>
		<dc:creator>visvabalaji</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://stringwriter.com/?p=405</guid>
		<description><![CDATA[Another basic issue I got when I tried to start the server. Initially I was getting the below error, Could not load the Tomcat server configuration at \Servers\Tomcat v7.0 Server at localhost-config. The configuration may be corrupt or incomplete. Resource is out of sync with the file system: &#8216;/Servers/Tomcat v7.0 Server at localhost-config/server.xml&#8217;. I still don&#8217;t [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringwriter.com&amp;blog=2738155&amp;post=405&amp;subd=visvabalaji&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Another basic issue I got when I tried to start the server. Initially I was getting the below error,</p>
<p>Could not load the Tomcat server configuration at \Servers\Tomcat v7.0 Server at localhost-config. The configuration may be corrupt or incomplete.<br />
Resource is out of sync with the file system: &#8216;/Servers/Tomcat v7.0 Server at localhost-config/server.xml&#8217;.</p>
<p>I still don&#8217;t know whats actual issue but I deleted the existing server from &#8220;Servers&#8221; tab and recreated it. Now it works!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/visvabalaji.wordpress.com/405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/visvabalaji.wordpress.com/405/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/visvabalaji.wordpress.com/405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/visvabalaji.wordpress.com/405/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/visvabalaji.wordpress.com/405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/visvabalaji.wordpress.com/405/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/visvabalaji.wordpress.com/405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/visvabalaji.wordpress.com/405/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/visvabalaji.wordpress.com/405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/visvabalaji.wordpress.com/405/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/visvabalaji.wordpress.com/405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/visvabalaji.wordpress.com/405/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/visvabalaji.wordpress.com/405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/visvabalaji.wordpress.com/405/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringwriter.com&amp;blog=2738155&amp;post=405&amp;subd=visvabalaji&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stringwriter.com/2011/10/05/could-not-load-the-tomcat-server-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c56817ed9984d16b3f4dd7e8afc4a5ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">visvabalaji</media:title>
		</media:content>
	</item>
		<item>
		<title>Change Tomcat Installation directory</title>
		<link>http://stringwriter.com/2011/10/05/change-tomcat-installation-directory/</link>
		<comments>http://stringwriter.com/2011/10/05/change-tomcat-installation-directory/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 17:33:33 +0000</pubDate>
		<dc:creator>visvabalaji</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://stringwriter.com/?p=401</guid>
		<description><![CDATA[As I&#8217;m new to JAVA, I find difficult to configure Tomcat or Eclispe. This might be very basic to experienced JAVA users but this post of meant for beginners! After I installed Tomcat 7.0.22 with Eclispe, I was not able to start the server, It throws &#8220;The specified Tomcat installation directory does not exist.&#8221;. I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringwriter.com&amp;blog=2738155&amp;post=401&amp;subd=visvabalaji&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;m new to JAVA, I find difficult to configure Tomcat or Eclispe. This might be very basic to experienced JAVA users but this post of meant for beginners!</p>
<p>After I installed Tomcat 7.0.22 with Eclispe, I was not able to start the server, It throws &#8220;The specified Tomcat installation directory does not exist.&#8221;. I remember that I&#8217;ve renamed the installation directory after I installed eclipse. In such case, we can change the installation directory.</p>
<p>Go to Menu -&gt; Preferences -&gt; Server -&gt; Runtime Environments</p>
<p>There you will see all the runtimes installed on your server. Select the runtime you want to change and select &#8220;Edit&#8221;.</p>
<p>Here we can change the installation directory in &#8220;Tomcat installation directory&#8221; field.</p>
<p>That&#8217;s it. It works!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/visvabalaji.wordpress.com/401/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/visvabalaji.wordpress.com/401/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/visvabalaji.wordpress.com/401/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/visvabalaji.wordpress.com/401/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/visvabalaji.wordpress.com/401/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/visvabalaji.wordpress.com/401/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/visvabalaji.wordpress.com/401/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/visvabalaji.wordpress.com/401/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/visvabalaji.wordpress.com/401/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/visvabalaji.wordpress.com/401/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/visvabalaji.wordpress.com/401/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/visvabalaji.wordpress.com/401/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/visvabalaji.wordpress.com/401/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/visvabalaji.wordpress.com/401/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringwriter.com&amp;blog=2738155&amp;post=401&amp;subd=visvabalaji&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stringwriter.com/2011/10/05/change-tomcat-installation-directory/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c56817ed9984d16b3f4dd7e8afc4a5ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">visvabalaji</media:title>
		</media:content>
	</item>
		<item>
		<title>Validate Web service in C#</title>
		<link>http://stringwriter.com/2011/09/16/validate-web-service-in-c/</link>
		<comments>http://stringwriter.com/2011/09/16/validate-web-service-in-c/#comments</comments>
		<pubDate>Fri, 16 Sep 2011 17:23:04 +0000</pubDate>
		<dc:creator>visvabalaji</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[SourceCode]]></category>

		<guid isPermaLink="false">http://stringwriter.com/?p=395</guid>
		<description><![CDATA[I&#8217;ve got many web services to read IMDB content. Some of them are failed to access while testing. So I needed to check whether they are really active before accessing them. Here&#8217;s the code snippet to check any website/web services are active.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringwriter.com&amp;blog=2738155&amp;post=395&amp;subd=visvabalaji&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve got many web services to read IMDB content. Some of them are failed to access while testing. So I needed to check whether they are really active before accessing them.</p>
<p>Here&#8217;s the code snippet to check any website/web services are active.</p>
<p><pre class="brush: csharp;">

public bool IsWebServiceActive(string webServicePath)
{
  try
  {
     WebRequest request = WebRequest.Create(webServicePath);

     return ((HttpWebResponse)request.GetResponse()).StatusCode == HttpStatusCode.OK;;
  }
  catch (Exception ex)
  {
     Console.WriteLine(ex.Message);
     return false;
  }
}

</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/visvabalaji.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/visvabalaji.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/visvabalaji.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/visvabalaji.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/visvabalaji.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/visvabalaji.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/visvabalaji.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/visvabalaji.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/visvabalaji.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/visvabalaji.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/visvabalaji.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/visvabalaji.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/visvabalaji.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/visvabalaji.wordpress.com/395/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringwriter.com&amp;blog=2738155&amp;post=395&amp;subd=visvabalaji&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stringwriter.com/2011/09/16/validate-web-service-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>13.060422 80.249583</georss:point>
		<geo:lat>13.060422</geo:lat>
		<geo:long>80.249583</geo:long>
		<media:content url="http://0.gravatar.com/avatar/c56817ed9984d16b3f4dd7e8afc4a5ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">visvabalaji</media:title>
		</media:content>
	</item>
		<item>
		<title>Update registry files using C#</title>
		<link>http://stringwriter.com/2011/09/16/update-registry-files-using-c/</link>
		<comments>http://stringwriter.com/2011/09/16/update-registry-files-using-c/#comments</comments>
		<pubDate>Fri, 16 Sep 2011 17:04:12 +0000</pubDate>
		<dc:creator>visvabalaji</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[SourceCode]]></category>

		<guid isPermaLink="false">http://stringwriter.com/?p=390</guid>
		<description><![CDATA[When I was doing my IMDB app, I found some of the code snippets are frequently used for desktop applications. Here&#8217;s the one code sample. I was having all my registry settings in .reg file instead of adding each entry through code. All we need to do is run this reg file through code.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringwriter.com&amp;blog=2738155&amp;post=390&amp;subd=visvabalaji&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When I was doing my IMDB app, I found some of the code snippets are frequently used for desktop applications. Here&#8217;s the one code sample.</p>
<p>I was having all my registry settings in .reg file instead of adding each entry through code. All we need to do is run this reg file through code.</p>
<p><pre class="brush: csharp;">

string filePath = &quot;IMDBSettings.reg&quot;;
.
.
.
Process.Start(&quot;regedit.exe&quot;, &quot;/s &quot; + filePath).WaitForExit();

</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/visvabalaji.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/visvabalaji.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/visvabalaji.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/visvabalaji.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/visvabalaji.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/visvabalaji.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/visvabalaji.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/visvabalaji.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/visvabalaji.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/visvabalaji.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/visvabalaji.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/visvabalaji.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/visvabalaji.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/visvabalaji.wordpress.com/390/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringwriter.com&amp;blog=2738155&amp;post=390&amp;subd=visvabalaji&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stringwriter.com/2011/09/16/update-registry-files-using-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>13.060422 80.249583</georss:point>
		<geo:lat>13.060422</geo:lat>
		<geo:long>80.249583</geo:long>
		<media:content url="http://0.gravatar.com/avatar/c56817ed9984d16b3f4dd7e8afc4a5ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">visvabalaji</media:title>
		</media:content>
	</item>
		<item>
		<title>Get object types in C#/Tridion 2009</title>
		<link>http://stringwriter.com/2011/08/11/get-object-types-in-ctridion-2009/</link>
		<comments>http://stringwriter.com/2011/08/11/get-object-types-in-ctridion-2009/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 04:10:49 +0000</pubDate>
		<dc:creator>visvabalaji</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[SourceCode]]></category>
		<category><![CDATA[Tridion]]></category>
		<category><![CDATA[Microsoft.VisualBasic]]></category>
		<category><![CDATA[TypeName]]></category>

		<guid isPermaLink="false">https://visvabalaji.wordpress.com/?p=383</guid>
		<description><![CDATA[In C#, the general usage to identify the object type is using “is” keyword. This is okay to some extent but you have to write “switch” of “if”, for multiple types. If there are more object types, code will be lengthy. Recently I came across a easy way of checking the object’s type. This is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringwriter.com&amp;blog=2738155&amp;post=383&amp;subd=visvabalaji&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In C#, the general usage to identify the object type is using “is” keyword. This is okay to some extent but you have to write “switch” of “if”, for multiple types. If there are more object types, code will be lengthy. Recently I <a href="http://bucksystems.blogspot.com/2005/03/com-types-in-interop-projects.html" target="_blank">came across</a> a easy way of checking the object’s type. This is helpful when the object is of COM type.</p>
<p>Just add the below reference in your project and call its TypeName method.</p>
<p><a href="http://visvabalaji.files.wordpress.com/2011/08/image.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;margin:0;" title="image" src="http://visvabalaji.files.wordpress.com/2011/08/image_thumb.png?w=390&#038;h=79" alt="image" width="390" height="79" border="0" /></a></p>
<p><pre class="brush: csharp;">

using Microsoft.VisualBasic;
.
.
.
.
.
public string GetTypeOf(object obj)
{
   return Microsoft.VisualBasic.Information.TypeName(obj);
}

</pre></p>
<p><strong>Output:</strong></p>
<p><a href="http://visvabalaji.files.wordpress.com/2011/08/image1.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://visvabalaji.files.wordpress.com/2011/08/image_thumb1.png?w=240&#038;h=52" alt="image" width="240" height="52" border="0" /></a></p>
<p>This was very handy for me in my migration project where I needed to write all the object details in log file.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/visvabalaji.wordpress.com/383/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/visvabalaji.wordpress.com/383/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/visvabalaji.wordpress.com/383/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/visvabalaji.wordpress.com/383/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/visvabalaji.wordpress.com/383/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/visvabalaji.wordpress.com/383/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/visvabalaji.wordpress.com/383/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/visvabalaji.wordpress.com/383/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/visvabalaji.wordpress.com/383/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/visvabalaji.wordpress.com/383/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/visvabalaji.wordpress.com/383/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/visvabalaji.wordpress.com/383/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/visvabalaji.wordpress.com/383/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/visvabalaji.wordpress.com/383/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringwriter.com&amp;blog=2738155&amp;post=383&amp;subd=visvabalaji&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stringwriter.com/2011/08/11/get-object-types-in-ctridion-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>13.060422 80.249583</georss:point>
		<geo:lat>13.060422</geo:lat>
		<geo:long>80.249583</geo:long>
		<media:content url="http://0.gravatar.com/avatar/c56817ed9984d16b3f4dd7e8afc4a5ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">visvabalaji</media:title>
		</media:content>

		<media:content url="http://visvabalaji.files.wordpress.com/2011/08/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://visvabalaji.files.wordpress.com/2011/08/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Iterate all Inner Exceptions in C#</title>
		<link>http://stringwriter.com/2011/07/26/iterate-all-inner-exceptions-in-c/</link>
		<comments>http://stringwriter.com/2011/07/26/iterate-all-inner-exceptions-in-c/#comments</comments>
		<pubDate>Tue, 26 Jul 2011 21:43:45 +0000</pubDate>
		<dc:creator>visvabalaji</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[InnerExceptions]]></category>
		<category><![CDATA[Source code]]></category>

		<guid isPermaLink="false">http://stringwriter.com/?p=366</guid>
		<description><![CDATA[In simple applications or pages, handling an exception will not be a difficult task. But when your application is using any web services or threading, most of the time, actual exception details will be stored in InnerException of the main Exception object. In such cases, we need to iterate all the inner exceptions to get the actual error [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringwriter.com&amp;blog=2738155&amp;post=366&amp;subd=visvabalaji&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In simple applications or pages, handling an exception will not be a difficult task. But when your application is using any web services or threading, most of the time, actual exception details will be stored in <em>InnerException</em> of the main <em>Exception</em> object. In such cases, we need to iterate all the inner exceptions to get the actual error message.</p>
<p>Here is a code snippet to iterate all inner exceptions from the root <em>Exception</em> object.</p>
<p><pre class="brush: csharp;">

private List&lt;string&gt; GetAllErrMessages(Exception ex)
{
   List&lt;string&gt; messages = new List&lt;string&gt;();
   //assign the current exception as first object and then loop through its
   //inner exceptions till they are null
   for(Exception eCurrent = ex.Exception; eCurrent != null; eCurrent = eCurrent.InnerException)
   {
      messages.Add(eCurrent.Message);
   }
}

</pre></p>
<p>My team said they never saw any code like handling <em>Exception</em> objects using for loop. I don&#8217;t know but I learnt this from my lead when I was working on Adrenalin HRMS product. Just sharing the code for your review <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/visvabalaji.wordpress.com/366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/visvabalaji.wordpress.com/366/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/visvabalaji.wordpress.com/366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/visvabalaji.wordpress.com/366/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/visvabalaji.wordpress.com/366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/visvabalaji.wordpress.com/366/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/visvabalaji.wordpress.com/366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/visvabalaji.wordpress.com/366/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/visvabalaji.wordpress.com/366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/visvabalaji.wordpress.com/366/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/visvabalaji.wordpress.com/366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/visvabalaji.wordpress.com/366/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/visvabalaji.wordpress.com/366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/visvabalaji.wordpress.com/366/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringwriter.com&amp;blog=2738155&amp;post=366&amp;subd=visvabalaji&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stringwriter.com/2011/07/26/iterate-all-inner-exceptions-in-c/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<georss:point>39.755531 -89.637502</georss:point>
		<geo:lat>39.755531</geo:lat>
		<geo:long>-89.637502</geo:long>
		<media:content url="http://0.gravatar.com/avatar/c56817ed9984d16b3f4dd7e8afc4a5ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">visvabalaji</media:title>
		</media:content>
	</item>
	</channel>
</rss>
