<?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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Technospot.Net &#187; Dot Net</title>
	<atom:link href="http://www.technospot.net/blogs/archives/programming/dot-net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.technospot.net/blogs</link>
	<description>Teaching How to use PC, Mobile and Internet the Right Way</description>
	<lastBuildDate>Wed, 25 Nov 2009 12:19:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<!-- podcast_generator="podPress/8.8" -->
		<copyright>&#xA9; </copyright>
		<managingEditor>info@technospot.net ()</managingEditor>
		<webMaster>info@technospot.net()</webMaster>
		<category></category>
		<ttl>1440</ttl>
		<itunes:keywords></itunes:keywords>
		<itunes:subtitle></itunes:subtitle>
		<itunes:summary>Teaching How to use PC and Internet the Right Way</itunes:summary>
		<itunes:author></itunes:author>
		<itunes:category text="Society &amp; Culture"/>
		<itunes:owner>
			<itunes:name></itunes:name>
			<itunes:email>info@technospot.net</itunes:email>
		</itunes:owner>
		<itunes:block>No</itunes:block>
		<itunes:explicit>no</itunes:explicit>
		<itunes:image href="http://i193.photobucket.com/albums/z221/ashishmohta/main/tsaudiopress.png" />
		<image>
			<url>http://i193.photobucket.com/albums/z221/ashishmohta/main/tsaudiopress.png</url>
			<title>Technospot.Net</title>
			<link>http://www.technospot.net/blogs</link>
			<width>144</width>
			<height>144</height>
		</image>
		<item>
		<title>Linq Provider for Twitter</title>
		<link>http://www.technospot.net/blogs/linq-provider-for-twitter/</link>
		<comments>http://www.technospot.net/blogs/linq-provider-for-twitter/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 06:30:32 +0000</pubDate>
		<dc:creator>Ashish Mohta</dc:creator>
				<category><![CDATA[Dot Net]]></category>
		<category><![CDATA[linq provider]]></category>
		<category><![CDATA[twitter api]]></category>
		<category><![CDATA[twitter tools]]></category>

		<guid isPermaLink="false">http://www.technospot.net/blogs/?p=6120</guid>
		<description><![CDATA[This is an interesting development which demonstrates the essentials of  how a LINQ provider can be built for connecting to Twitter API using LINQ framework. 
I had been working on Linq since 6 months the concept is awesome. I am big fan of LINQ and Twitter is the Social Networking platform I use and anything [...]]]></description>
			<content:encoded><![CDATA[<p>This is an interesting development which demonstrates the essentials of  how a <strong>LINQ provider can be built for connecting to Twitter API using LINQ framework. </strong></p>
<p>I had been working on Linq since 6 months the concept is awesome. I am big fan of LINQ and Twitter is the Social Networking platform I use and anything coupling them would be really intresting. I have thought of creating providers for databases but creating a provide for Public API was I never thought of.</p>
<p>This is what the lead, <a href="http://www.codeplex.com/site/users/view/JoeMayo">JoeMayo</a>,  says there</p>
<blockquote><p>So far, LINQ to Twitter demonstrates the essentials of how a LINQ provider can be built and supports a couple simple queries, such as Public and Friends. You&#8217;ll begin to see more features in time, focusing on sub-sets of the Twitter API. In the next release, I&#8217;m planning on finishing infrastructure tasks and adding support for all of the optional Friends parameters.  More later&#8230;</p></blockquote>
<p>This project is still in beta and If anybody wants to join in the development you can head towards <a href="http://www.codeplex.com/LinqToTwitter">Linq to Twitter @ Codeplex</a></p>
<p>
<a href="http://twitter.com/?status=Linq Provider for Twitter + http://www.technospot.net/blogs?p=6120"><img  src="http://img.technospot.net/assets/tweetthis.png"/></a>  <a href="http://www.facebook.com/sharer.php?u=http://www.technospot.net/blogs/linq-provider-for-twitter/"  title="Share on facebook" > <img src="http://img.technospot.net/assets/fbshare.png"/></a>
</p>
<p><small><a href="http://www.technospot.net/blogs/linq-provider-for-twitter/" title="Linq Provider for Twitter" > Linq Provider for Twitter </a> by Ashish Mohta originally appeared on <a href="http://www.technospot.net/blogs" title="How to use PC and Internet the right way">Technospot.Net </a> on February 1, 2009, 12:00 pm. Please see our <a href="http://www.technospot.net/blogs/copyright-regulations/">terms for use</a> of feeds.</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.technospot.net/blogs/linq-provider-for-twitter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to use escape sequences in strings using VB.Net</title>
		<link>http://www.technospot.net/blogs/how-to-use-escape-sequences-in-strings-using-vb-net/</link>
		<comments>http://www.technospot.net/blogs/how-to-use-escape-sequences-in-strings-using-vb-net/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 15:28:47 +0000</pubDate>
		<dc:creator>Ashish Mohta</dc:creator>
				<category><![CDATA[Dot Net]]></category>
		<category><![CDATA[c# tips]]></category>
		<category><![CDATA[escape sequences]]></category>
		<category><![CDATA[strings]]></category>
		<category><![CDATA[vb programmers]]></category>
		<category><![CDATA[vb tips]]></category>

		<guid isPermaLink="false">http://www.technospot.net/blogs/?p=90</guid>
		<description><![CDATA[Visual Basic does not support control or special or escape sequences like “\n” ( new line ) or “\t” which forces VB programmers to use constants like ControlChars.Crlf and ConrolChars.Tab. The biggest disadvantage of this is , it makes your code ugly or in technical language less readable. So this is the way we use it [...]]]></description>
			<content:encoded><![CDATA[<p>Visual Basic does not <a id="KonaLink0" class="kLink" style="text-decoration: underline ! important; position: static;" href="../how-to-use-escape-sequences-in-strings-using-vb-net/#" target="_top"></a>support control or special or escape sequences like “\n” ( new line ) or “\t” which forces VB programmers to use constants like ControlChars.Crlf and ConrolChars.Tab. The biggest disadvantage of this is , it makes your code ugly or in technical language less readable. So this is the way we use it without escape characters</p>
<blockquote><p>‘[ Visual Basic ]</p>
<p>Dim mystring as String = “Ashish Mohta ” &amp; ControlChars.Crlf  &amp; “Phone” &amp; ConrolChars.Tab &amp; “Mynumber”</p></blockquote>
<p>However there is a way to use the special characters which comes with little expense by using Regex.Unescape static method which takes a string that contains C# like escape sequences such as new line or tab.</p>
<blockquote><p>‘[ Visual Basic ]</p>
<p>Dim mystring as String = Regex.Unescape(”Ashish Mohta\n Phone\tMynumber”)</p></blockquote>
<p>I can bet that’s going to improve Vb programmers life a little bit more.</p>
<p>
<a href="http://twitter.com/?status=How to use escape sequences in strings using VB.Net + http://www.technospot.net/blogs?p=90"><img  src="http://img.technospot.net/assets/tweetthis.png"/></a>  <a href="http://www.facebook.com/sharer.php?u=http://www.technospot.net/blogs/how-to-use-escape-sequences-in-strings-using-vb-net/"  title="Share on facebook" > <img src="http://img.technospot.net/assets/fbshare.png"/></a>
</p>
<p><small><a href="http://www.technospot.net/blogs/how-to-use-escape-sequences-in-strings-using-vb-net/" title="How to use escape sequences in strings using VB.Net" > How to use escape sequences in strings using VB.Net </a> by Ashish Mohta originally appeared on <a href="http://www.technospot.net/blogs" title="How to use PC and Internet the right way">Technospot.Net </a> on April 6, 2008, 8:58 pm. Please see our <a href="http://www.technospot.net/blogs/copyright-regulations/">terms for use</a> of feeds.</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.technospot.net/blogs/how-to-use-escape-sequences-in-strings-using-vb-net/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>5 Wrong ways to check empty strings</title>
		<link>http://www.technospot.net/blogs/5-wrong-ways-to-check-empty-strings/</link>
		<comments>http://www.technospot.net/blogs/5-wrong-ways-to-check-empty-strings/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 13:21:03 +0000</pubDate>
		<dc:creator>Ashish Mohta</dc:creator>
				<category><![CDATA[Dot Net]]></category>
		<category><![CDATA[check empty strings]]></category>
		<category><![CDATA[empty strings]]></category>

		<guid isPermaLink="false">http://www.technospot.net/blogs/?p=638</guid>
		<description><![CDATA[It is one of the common mistake that people compare a string with “” or String.Empty in VB.Net or C# to find its empty. Here are few examples.
// C#   Wrong Ways

if ( s == “” )
if ( s == string.Empty )
if ( s.Equals(”&#8221;) )
if ( s.Equals ( String.Empty)
if ( string.Equals(s,”&#8221;)
if ( string.Equals ( [...]]]></description>
			<content:encoded><![CDATA[<p>It is one of the common mistake that people compare a string with “” or String.Empty in VB.Net or C# to find its empty. Here are few examples.</p>
<blockquote><p>// C#   Wrong Ways</p>
<ol>
<li>if ( s == “” )</li>
<li>if ( s == string.Empty )</li>
<li>if ( s.Equals(”&#8221;) )</li>
<li>if ( s.Equals ( String.Empty)</li>
<li>if ( string.Equals(s,”&#8221;)</li>
<li>if ( string.Equals ( s,String.Empty ))</li>
</ol>
</blockquote>
<p>So what’s the correct way to do it ? Check for length too.</p>
<blockquote><p>// [ C# ]  Correct Way</p>
<p>if ( s.Length == 0 )</p></blockquote>
<p>This is in continuation of our last post on <a title="Check for length too when you check for null strings in VB.Net and C#" href="../check-for-length-too-when-you-check-for-null-strings/">Check for length too when you check for null strings in VB.Net and C#</a></p>
<p>Read below for the right approach.</p>
<ul class="commentlist">
<li id="comment-120971" class="even">
<div class="comment-meta"><a rel="external nofollow" href="http://ryanheaney.info/">Ryan Heaney</a>,                 March 27, 2008:</div>
<div class="comment-text">
<p><a rel="external nofollow" href="http://ryanheaney.info/"><img class="avatar avatar-40" src="http://www.gravatar.com/avatar/cb47cbabae5f57de503dc43758d71f42?s=40&amp;d=http%3A%2F%2Fuse.perl.org%2Fimages%2Fpix.gif&amp;r=G" alt="" width="40" height="40" /></a>I agree with Shahar. string.IsNullOrEmpty is the best, managed way to test. It’s static and guaranteed not to throw a NullReferenceException. You can’t say that about .Length.</p>
<p>If you look at the disassembly of string.IsNullOrEmpty you will see what it does.<br />
.method public hidebysig static bool IsNullOrEmpty(string ‘value’) cil managed<br />
{<br />
.maxstack 8<br />
L_0000: ldarg.0<br />
L_0001: brfalse.s L_000d<br />
L_0003: ldarg.0<br />
L_0004: callvirt instance int32 System.String::get_Length()<br />
L_0009: ldc.i4.0<br />
L_000a: ceq<br />
L_000c: ret<br />
L_000d: ldc.i4.1<br />
L_000e: ret<br />
}</p>
<p>This translates to (C#):<br />
public static bool IsNullOrEmpty(string value)<br />
{<br />
if (value != null)<br />
{<br />
return (value.Length == 0);<br />
}<br />
return true;<br />
}</p>
<p>Now while you can perform this operation on your own, the whole point of the .NET Framework is the fact that this is managed code. If for some reason Microsoft decides to change the implementation of the string class such that there is another case in which it is empty, it would change its implementation here. And you would never have to worry about your code breaking due to an underlying change.</p>
<p>So, in short, use string.IsNullOrEmpty().</p></div>
</li>
</ul>
<p>
<a href="http://twitter.com/?status=5 Wrong ways to check empty strings + http://www.technospot.net/blogs?p=638"><img  src="http://img.technospot.net/assets/tweetthis.png"/></a>  <a href="http://www.facebook.com/sharer.php?u=http://www.technospot.net/blogs/5-wrong-ways-to-check-empty-strings/"  title="Share on facebook" > <img src="http://img.technospot.net/assets/fbshare.png"/></a>
</p>
<p><small><a href="http://www.technospot.net/blogs/5-wrong-ways-to-check-empty-strings/" title="5 Wrong ways to check empty strings" > 5 Wrong ways to check empty strings </a> by Ashish Mohta originally appeared on <a href="http://www.technospot.net/blogs" title="How to use PC and Internet the right way">Technospot.Net </a> on April 6, 2008, 6:51 pm. Please see our <a href="http://www.technospot.net/blogs/copyright-regulations/">terms for use</a> of feeds.</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.technospot.net/blogs/5-wrong-ways-to-check-empty-strings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Check for length too when you check for null strings in VB.Net and C#</title>
		<link>http://www.technospot.net/blogs/check-for-length-too-when-you-check-for-null-strings/</link>
		<comments>http://www.technospot.net/blogs/check-for-length-too-when-you-check-for-null-strings/#comments</comments>
		<pubDate>Thu, 27 Mar 2008 15:21:01 +0000</pubDate>
		<dc:creator>Ashish Mohta</dc:creator>
				<category><![CDATA[Dot Net]]></category>
		<category><![CDATA[comments check]]></category>
		<category><![CDATA[emptiness]]></category>
		<category><![CDATA[empty string]]></category>
		<category><![CDATA[error message]]></category>
		<category><![CDATA[null object]]></category>
		<category><![CDATA[object reference]]></category>

		<guid isPermaLink="false">http://www.technospot.net/blogs/?p=1413</guid>
		<description><![CDATA[Its a good idea to check for null object reference to prevent NullReferenceException when it comes to objects but in case of Strings sometimes you get a string without any value or called as Empty string. I have faced this a lot of time when I handle exceptions and the error message ( which is [...]]]></description>
			<content:encoded><![CDATA[<p>Its a good idea to check for null object reference to prevent NullReferenceException when it comes to objects but in case of Strings sometimes you get a string without any value or called as Empty string. I have faced this a lot of time when I handle exceptions and the error message ( which is a string ) turns out to be empty hence there is no meaning to show that message or store it in database. So the good idea is to check for null and for emptiness ( zero length string ) bot at the same time.</p>
<blockquote><p><strong>‘[ Visual Basic ]</strong></p>
<p>Sub CheckNullString ( ByVal msg as String )</p>
<p>if msg is nothing or Else msg.length = 0 Then Exit Sub</p>
<p>‘ Do whatever you want in case both are false.</p>
<p>End Sub</p></blockquote>
<blockquote><p><strong>// C#</strong></p>
<p>public void checkNullString ( string msg )</p>
<p>{</p>
<p>if ( msg == null || msg.Length == 0 )  return;</p>
<p>// Do whatever you want here in case both are false.</p>
<p>}</p></blockquote>
<p>This is one good way I was able to find . How do you check your strings ? Do share with us in comments .</p>
<p>
<a href="http://twitter.com/?status=Check for length too when you check for null strings in VB.Net and C# + http://www.technospot.net/blogs?p=1413"><img  src="http://img.technospot.net/assets/tweetthis.png"/></a>  <a href="http://www.facebook.com/sharer.php?u=http://www.technospot.net/blogs/check-for-length-too-when-you-check-for-null-strings/"  title="Share on facebook" > <img src="http://img.technospot.net/assets/fbshare.png"/></a>
</p>
<p><small><a href="http://www.technospot.net/blogs/check-for-length-too-when-you-check-for-null-strings/" title="Check for length too when you check for null strings in VB.Net and C#" > Check for length too when you check for null strings in VB.Net and C# </a> by Ashish Mohta originally appeared on <a href="http://www.technospot.net/blogs" title="How to use PC and Internet the right way">Technospot.Net </a> on March 27, 2008, 8:51 pm. Please see our <a href="http://www.technospot.net/blogs/copyright-regulations/">terms for use</a> of feeds.</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.technospot.net/blogs/check-for-length-too-when-you-check-for-null-strings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XPath Tutorial with Examples</title>
		<link>http://www.technospot.net/blogs/xpath-tutorial-with-examples/</link>
		<comments>http://www.technospot.net/blogs/xpath-tutorial-with-examples/#comments</comments>
		<pubDate>Tue, 01 Jan 2008 12:05:38 +0000</pubDate>
		<dc:creator>Ashish Mohta</dc:creator>
				<category><![CDATA[Dot Net]]></category>
		<category><![CDATA[xml-tutorial]]></category>
		<category><![CDATA[xpath-query]]></category>
		<category><![CDATA[xpath-tutorial]]></category>

		<guid isPermaLink="false">http://www.technospot.net/blogs/?p=624</guid>
		<description><![CDATA[This post is a small introduction for xpath (XML Path Language) is a terse (non-XML) syntax for addressing portions of an XML document. XPath has rapidly been adopted by developers as a small query language.
With the increase in usage of xml being sent on internet for transferring data there was huge need of some standard [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a small introduction for xpath (XML Path Language) is a terse (non-XML) syntax for addressing portions of an XML document. XPath has rapidly been adopted by developers as a small query language.</p>
<p>With the increase in usage of xml being sent on internet for transferring data there was huge need of some standard way for accessing data in a simple and fast manner.Thats what is Xpath is about.</p>
<h4>Introduction to Xpath</h4>
<p>XPath is a language for finding information in an XML document. It allows consumers of Xml to query it and access any part of it directly.It may return null, a string, a number or an xml node itself. XPath is used to navigate through elements and attributes in an XML document.</p>
<p align="left"><strong>What is XPath?</strong></p>
<ul>
<li>XPath is a syntax for defining parts of an XML document.</li>
<li>XPath uses path expressions to navigate in XML documents .</li>
<li>XPath contains a library of standard functions.</li>
<li>XPath is a major element in XSLT.</li>
<li>XPath is a W3C Standard.</li>
</ul>
<p>Now when it says expression we are not talking abt scary regular expressions but simple expressions which we use it for our desktop searching often like [.*].Now lets start with an example and go ahead in this.</p>
<p><strong>Example XML File.</strong></p>
<blockquote><p>&lt;?xml version=”1.0″ encoding=”ISO-8859-1″?&gt;</p>
<p>&lt;bookstore&gt;[document node]&lt;</p>
<p>book&gt;&lt;title lang=”en”&gt;[attribute]Harry Potter&lt;/title&gt;[element]&lt;</p>
<p>author&gt;JKRowling&lt;/author&gt;</p>
<p>&lt;year&gt;2005&lt;/year&gt;</p>
<p>&lt;price&gt;29.99&lt;/price&gt;</p>
<p>&lt;/book&gt;</p>
<p>&lt;/bookstore&gt;</p></blockquote>
<p>An XML is treated as a tree of nodes.If we closely look there are around seven kind of nodes defined by XPath.The root of this tree is called as document node or root node.The nodes are element, attribute, text, namespace, processing-instruction, comment, and document (root)nodes.</p>
<p align="left"><strong>XML NODES</strong></p>
<ol>
<li>bookstore is root node,title is an element and lang=’en’ is attribute.</li>
<li>ParentEach element and attribute has one parent.In the example; the book element is the parent of the title, author, year, and price.</li>
<li>Children:Element nodes may have zero, one or more children.In the example; the title, author, year, and price elements are all children of the book element.</li>
<li>Siblings : Nodes that have the same parent.In the example; the title, author, year, and price elements are all siblings.</li>
<li>Ancestors : A node’s parent, parent’s parent, etc.In the example; the ancestors of the title element are the book element and the bookstore element.</li>
<li>Descendants: A node’s children, children’s children, etc. In the example; descendants of the bookstore element are the book, title, author, year, and price elements.</li>
</ol>
<p>Now since we are clear with the basics of xpath we can take an example of it and work along.Let’s try to learn some basic XPath syntax by looking at some examples.</p>
<h2>The XML Example Document</h2>
<blockquote>
<pre>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;</pre>
<pre>&lt;bookstore&gt;</pre>
<pre>&lt;book category="COOKING"&gt;
&lt;title lang="en"&gt;Everyday Italian&lt;/title&gt;
&lt;author&gt;Giada De Laurentiis&lt;/author&gt;
&lt;year&gt;2005&lt;/year&gt;
&lt;price&gt;30.00&lt;/price&gt;
&lt;/book&gt;</pre>
<pre>&lt;book category="CHILDREN"&gt;
&lt;title lang="en"&gt;Harry Potter&lt;/title&gt;
&lt;author&gt;J K. Rowling&lt;/author&gt;
&lt;year&gt;2005&lt;/year&gt;
&lt;price&gt;29.99&lt;/price&gt;
&lt;/book&gt;</pre>
<pre>&lt;book category="WEB"&gt;
&lt;title lang="en"&gt;XQuery Kick Start&lt;/title&gt;
&lt;author&gt;James McGovern&lt;/author&gt;
&lt;author&gt;Per Bothner&lt;/author&gt;
&lt;author&gt;Kurt Cagle&lt;/author&gt;
&lt;author&gt;James Linn&lt;/author&gt;
&lt;author&gt;Vaidyanathan Nagarajan&lt;/author&gt;
&lt;year&gt;2003&lt;/year&gt;
&lt;price&gt;49.99&lt;/price&gt;
&lt;/book&gt;</pre>
<pre>&lt;book category="WEB"&gt;
&lt;title lang="en"&gt;Learning XML&lt;/title&gt;
&lt;author&gt;Erik T. Ray&lt;/author&gt;
&lt;year&gt;2003&lt;/year&gt;
&lt;price&gt;39.95&lt;/price&gt;
&lt;/book&gt;</pre>
<pre>&lt;/bookstore&gt;</pre>
</blockquote>
<p><strong>Selecting Nodes:</strong></p>
<p><strong></strong><br />
We will use the Microsoft XMLDOM object to load the XML document and the selectNodes() function to select nodes from the XML document:</p>
<blockquote><p>set xmlDoc=CreateObject(”Microsoft.XMLDOM”)<br />
xmlDoc.async=”false”<br />
xmlDoc.load(”books.xml”)xmlDoc.selectNodes(path expression)</p></blockquote>
<p><strong>Select all book Nodes:</strong><br />
The following example selects all the book nodes under the bookstore element:</p>
<blockquote><p>xmlDoc.selectNodes(”/bookstore/book”)</p></blockquote>
<p><strong>Select the First book Node:</strong></p>
<p>The following example selects only the first book node under the bookstore element:</p>
<blockquote><p>xmlDoc.selectNodes(”/bookstore/book[0]“)</p></blockquote>
<p><strong>Select the prices:</strong></p>
<p>The following example selects the text from all the price nodes:</p>
<blockquote><p>xmlDoc.selectNodes(”/bookstore/book/price/text()”)</p></blockquote>
<p><strong>Selecting price Nodes with Price&gt;35:</strong></p>
<p>The following example selects all the price nodes with a price higher than 35:</p>
<blockquote><p>xmlDoc.selectNodes(”/bookstore/book[price&gt;35]/price”)</p></blockquote>
<p>Thus from the above example we can see how to navigate through an xml document and navigate through it and retrieve the data.This was just a small idea how it works.XPath is bigger than this.If you have still some query i would refer to go through more books to see the actual implementation of it in detail.</p>
<p>For a Complete details i would like to recommend to go through standards and follow the links</p>
<p><strong>External links:</strong></p>
<ul>
<li><a title="http://www.w3.org/TR/xpath20/" href="http://www.w3.org/TR/xpath20/">XPath 2.0 (W3C Candidate Recommendation)</a></li>
<li><a title="http://www.w3.org/TR/xquery/" href="http://www.w3.org/TR/xquery/">XQuery 1.0 (W3C Candidate Recommendation)</a></li>
<li><a title="http://www.w3.org/TR/xslt20/" href="http://www.w3.org/TR/xslt20/">XSLT 2.0 (W3C Candidate Recommendation)</a></li>
<li><a href="../linq-tutorial-with-dot-net-framework-30/">LINQ Tutorial with Dot Net Framework 3.0</a></li>
</ul>
<p>
<a href="http://twitter.com/?status=XPath Tutorial with Examples + http://www.technospot.net/blogs?p=624"><img  src="http://img.technospot.net/assets/tweetthis.png"/></a>  <a href="http://www.facebook.com/sharer.php?u=http://www.technospot.net/blogs/xpath-tutorial-with-examples/"  title="Share on facebook" > <img src="http://img.technospot.net/assets/fbshare.png"/></a>
</p>
<p><small><a href="http://www.technospot.net/blogs/xpath-tutorial-with-examples/" title="XPath Tutorial with Examples" > XPath Tutorial with Examples </a> by Ashish Mohta originally appeared on <a href="http://www.technospot.net/blogs" title="How to use PC and Internet the right way">Technospot.Net </a> on January 1, 2008, 5:35 pm. Please see our <a href="http://www.technospot.net/blogs/copyright-regulations/">terms for use</a> of feeds.</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.technospot.net/blogs/xpath-tutorial-with-examples/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Accelerator keys you should avoid for Asp.Net 2.0 controls</title>
		<link>http://www.technospot.net/blogs/accelerator-keys-you-should-avoid-for-asp-net-20-controls/</link>
		<comments>http://www.technospot.net/blogs/accelerator-keys-you-should-avoid-for-asp-net-20-controls/#comments</comments>
		<pubDate>Fri, 26 Oct 2007 18:55:31 +0000</pubDate>
		<dc:creator>Ashish Mohta</dc:creator>
				<category><![CDATA[Dot Net]]></category>
		<category><![CDATA[accelerator keys]]></category>
		<category><![CDATA[dot net tips]]></category>
		<category><![CDATA[hot keys]]></category>
		<category><![CDATA[server controls]]></category>

		<guid isPermaLink="false">http://www.technospot.net/blogs/?p=1717</guid>
		<description><![CDATA[Asp.Net 2.0 server Controls like Label, TexBox etc. now can be quickly accessed from keyboard by assigning accelerator keys to them at design time. Accelerator keys or Hot keys allows controls to be accessed and get focused by specific hot key press ( for example ALT + N)  similar to CTRL + C is [...]]]></description>
			<content:encoded><![CDATA[<p>Asp.Net 2.0 server Controls like Label, TexBox etc. now c<strong>an be quickly accessed from keyboard by assigning accelerator keys to them at design time</strong>. Accelerator keys or Hot keys allows controls <strong>to be accessed and get focused by specific hot key press</strong> ( for example ALT + N)  similar to CTRL + C is used for copy.</p>
<p>So now if you have made a text box for entering username and assign Hot key as ALT + E, What happens ? The users will <strong>access the edit menu of IE or Firefox but not that text box.</strong></p>
<p>Note: Hot keys are assigned using AccessKey syntax , see the bold part of below code.</p>
<pre> <span style="color: #0000ff;">&lt;</span><span style="color: #800000;">asp</span><span style="color: #0000ff;">:</span><span style="color: #800000;">TextBox</span> <span style="color: #ff0000;">ID</span><span style="color: #0000ff;">=”TextBox1″</span> <strong><span style="color: #ff0000;">AccessKey</span> <span style="color: #0000ff;">=”E”</span></strong> <span style="color: #ff0000;">runat</span><span style="color: #0000ff;">=”server”&gt;&lt;/</span><span style="color: #800000;">asp</span><span style="color: #0000ff;">:</span><span style="color: #800000;">TextBox</span><span style="color: #0000ff;">&gt;</span></pre>
<p>Assigning Hot-Keys or accelerator keys to asp.net 2.0 controls which is same as Browsers Hot-keys is one of the major mistake you will do if you are designing web based applications or web sites. AVOID IT. Here is the list of hot keys you should not use</p>
<ul>
<li>ALT + F</li>
<li>ALT + E</li>
<li>ALT + V</li>
<li>ALT + I</li>
<li>ALT + O</li>
<li>ALT + T</li>
<li>ALT + A</li>
<li>ALT + W</li>
<li>ALT + H</li>
</ul>
<p>If you use any of these <strong>IE or Firefox actions supersede any actions you place on page.</strong></p>
<p>
<a href="http://twitter.com/?status=Accelerator keys you should avoid for Asp.Net 2.0 controls + http://www.technospot.net/blogs?p=1717"><img  src="http://img.technospot.net/assets/tweetthis.png"/></a>  <a href="http://www.facebook.com/sharer.php?u=http://www.technospot.net/blogs/accelerator-keys-you-should-avoid-for-asp-net-20-controls/"  title="Share on facebook" > <img src="http://img.technospot.net/assets/fbshare.png"/></a>
</p>
<p><small><a href="http://www.technospot.net/blogs/accelerator-keys-you-should-avoid-for-asp-net-20-controls/" title="Accelerator keys you should avoid for Asp.Net 2.0 controls" > Accelerator keys you should avoid for Asp.Net 2.0 controls </a> by Ashish Mohta originally appeared on <a href="http://www.technospot.net/blogs" title="How to use PC and Internet the right way">Technospot.Net </a> on October 27, 2007, 12:25 am. Please see our <a href="http://www.technospot.net/blogs/copyright-regulations/">terms for use</a> of feeds.</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.technospot.net/blogs/accelerator-keys-you-should-avoid-for-asp-net-20-controls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LINQ Tutorial with Dot Net Framework 3.0 and 3.5</title>
		<link>http://www.technospot.net/blogs/linq-tutorial-with-dot-net-framework-30/</link>
		<comments>http://www.technospot.net/blogs/linq-tutorial-with-dot-net-framework-30/#comments</comments>
		<pubDate>Mon, 21 May 2007 15:48:58 +0000</pubDate>
		<dc:creator>Ashish Mohta</dc:creator>
				<category><![CDATA[Dot Net]]></category>
		<category><![CDATA[dot net framework]]></category>
		<category><![CDATA[msdn]]></category>

		<guid isPermaLink="false">http://www.technospot.net/blogs/?p=57</guid>
		<description><![CDATA[With the advancement of technologies and database it has become a great challenge to retrieve data faster and with less burden on programming part.
It has become apparent that the next big challenge in programming technology is to reduce the complexity of accessing and integrating information that is not natively defined using OO technology. The two [...]]]></description>
			<content:encoded><![CDATA[<p>With the advancement of technologies and database it has become a great challenge to retrieve data faster and with less burden on programming part.</p>
<p>It has become apparent that the next big challenge in programming technology is to reduce the complexity of accessing and integrating information that is not natively defined using OO technology. The two most common sources of non-OO information are relational databases and XML.</p>
<p>The major advantage of <a href="http://msdn.microsoft.com/data/ref/linq/">Microsoft’s LINQ Project</a> is the general approach they have taken because they have integrated a query language irrespective of any specific part.Language Integrated Query can be used with XML,Database or anything which is capable of returning IENUMERABLE.</p>
<p>Here is a small tutorial that can explaining. This is specially for my readers who love to do to porgamming.</p>
<p>This is a snippet which i found in the doc itself which can express the power of LINQ and make programmers of dot net really smile.</p>
<blockquote><p>
using System; using System.Query;<br />
using System.Collections.Generic;<br />
class app {<br />
static void Main() {<br />
string[] names = { “Burke”, “Connor”, “Frank”,“Everett”, “Albert”, “George”,”Harris”, “David” };</p>
<p>IEnumerable expr = from s in names<br />
where ( s.Length == 5 orderby s )<br />
select s.ToUpper();<br />
foreach (string item in expr)<br />
Console.WriteLine(item);</p>
<p>}</p>
<p>}</p></blockquote>
<h3>How Linq works with XML ?</h3>
<p>The extensibility of the query architecture is used in the LINQ project itself to provide implementations that work over both XML and SQL data.</p>
<p>Xpath and Xquery which is used heavily is in the host programming language. Here is again a code snippet for showing how easy it is to work with LINQX(yes that&#8217;s what its called for XML’s)</p>
<p>The Standard way is done as follows:</p>
<blockquote><p>
XmlDocument doc = new XmlDocument();<br />
XmlElement name = doc.CreateElement(&#8221;name&#8221;);<br />
name.InnerText = &#8220;Patrick Hines&#8221;;<br />
XmlElement phone1 = doc.CreateElement(&#8221;phone&#8221;);<br />
phone1.SetAttribute(&#8221;type&#8221;, &#8220;home&#8221;);<br />
XmlElement phone2 = doc.CreateElement(&#8221;phone&#8221;);<br />
phone2.SetAttribute(&#8221;type&#8221;, &#8220;work&#8221;);<br />
XmlElement street1 = doc.CreateElement(&#8221;street1&#8243;);<br />
XmlElement city = doc.CreateElement(&#8221;city&#8221;);<br />
city.InnerText = &#8220;Mercer Island&#8221;;<br />
XmlElement state = doc.CreateElement(&#8221;state&#8221;);<br />
state.InnerText = &#8220;WA&#8221;;<br />
XmlElement postal = doc.CreateElement(&#8221;postal&#8221;);<br />
postal.InnerText = &#8220;68042&#8243;;<br />
XmlElement address = doc.CreateElement(&#8221;address&#8221;);<br />
address.AppendChild(street1);<br />
address.AppendChild(city);<br />
address.AppendChild(state);<br />
address.AppendChild(postal);<br />
XmlElement contact = doc.CreateElement(&#8221;contact&#8221;);<br />
contact.AppendChild(name);<br />
contact.AppendChild(phone1);<br />
contact.AppendChild(phone2);<br />
contact.AppendChild(address);<br />
XmlElement contacts = doc.CreateElement(&#8221;contacts&#8221;);<br />
contacts.AppendChild(contact);<br />
doc.AppendChild(contacts);</p></blockquote>
<p>If we see it little closer the above code , This style of coding provides few clues to the structure of the XML tree. but with LINQX it becomes more of what they as functional construct.Here is what how u code the same with LINQX….</p>
<blockquote><p>XElement contacts = new XElement<br />
(&#8221;contacts&#8221;,new XElement(&#8221;contact&#8221;,<br />
new XElement(&#8221;name&#8221;, &#8220;Patrick Hines&#8221;),<br />
new XElement(&#8221;phone&#8221;, &#8220;206-555-0144&#8243;,<br />
new XAttribute(&#8221;type&#8221;, &#8220;home&#8221;))<br />
,new XElement(&#8221;phone&#8221;, &#8220;425-555-0145&#8243;,new XAttribute(&#8221;type&#8221;, &#8220;work&#8221;)),<br />
new XElement(&#8221;address&#8221;,new XElement(&#8221;street1&#8243;, &#8220;123 Main t&#8221;),<br />
new XElement(&#8221;city&#8221;, &#8220;Mercer Island&#8221;),<br />
new XElement(&#8221;state&#8221;, &#8220;WA&#8221;),new XElement(&#8221;postal&#8221;,&#8221;6843&#8243;)</p></blockquote>
<p>This is so simple no hassles at all.</p>
<h3>How LINQ works with database</h3>
<p>Yup its done By Microsoft again under LINQD(thats LINQ for database). The query operators over relational data (DLinq) build on the integration of SQL-based schema definitions into the CLR type system.</p>
<p>This integration provides strong typing over relational data while retaining the expressive power of the relational model and the performance of query evaluation directly in the underlying store.</p>
<p>What we kneed to know is the structure of database table we want to deal with it and create a class exactly having private variables as columns of the underlying table say may be like save that easy.Thus in simple way we create an object of the row of that table in memory and do operation on that and ask somebody to save it.Moreover we can ask for a collection of those rows fo get more than one record and do a query on it..isnt that great no hassles of database sql.</p>
<p><strong>1. Create an entity class with mapping to database table like this:-</strong></p>
<blockquote><p>
[Table(Name="Customers")]<br />
public class Customer<br />
{<br />
[Column (Id=true)]<br />
public string CustomerID;<br />
private string _City;<br />
[Column(Storage = "_City")]<br />
public string City<br />
{<br />
get { return this._City; }<br />
set { this._City = value; }}}</p></blockquote>
<p><strong>2.Create a Data context to load from database</strong></p>
<blockquote><p>
static void Main(string[] args){<br />
// Use a standard connection string<br />
DataContext db = new DataContext(<br />
@”C:Program FilesLINQ PreviewDatanorthwnd.mdf”);<br />
// Get a typed table to run queries<br />
Table Customers = db.GetTable();</p></blockquote>
<p><strong>3.Query what you get….</strong></p>
<blockquote><p>// Attach the log showing generated SQL to console<br />
// This is only for debugging / understanding the working of DLinq<br />
db.Log = Console.Out;<br />
// Query for customers in London<br />
var custs =<br />
from c in Customers<br />
where c.City == &#8220;London&#8221;<br />
select c;<br />
}</p></blockquote>
<p>Thats how it works with database….easy isn&#8217;t it…This Technology will come with <a href="../get-the-dot-net-framework-3/">DotNet Framework 3.0</a> and with C#3.0 and VB 9. I havent covered every thing but just a quick glance which can get grasping things faster. If you want to read more on it see the <a href="http://msdn.microsoft.com/data/ref/linq/">Microsoft’s LINQ Project</a></p>
<p><strong>Related : <a title="Linq provider for Twitter API" href="http://www.technospot.net/blogs/linq-provider-for-twitter/">Linq provider for Twitter API</a></strong></p>
<p>
<a href="http://twitter.com/?status=LINQ Tutorial with Dot Net Framework 3.0 and 3.5 + http://www.technospot.net/blogs?p=57"><img  src="http://img.technospot.net/assets/tweetthis.png"/></a>  <a href="http://www.facebook.com/sharer.php?u=http://www.technospot.net/blogs/linq-tutorial-with-dot-net-framework-30/"  title="Share on facebook" > <img src="http://img.technospot.net/assets/fbshare.png"/></a>
</p>
<p><small><a href="http://www.technospot.net/blogs/linq-tutorial-with-dot-net-framework-30/" title="LINQ Tutorial with Dot Net Framework 3.0 and 3.5" > LINQ Tutorial with Dot Net Framework 3.0 and 3.5 </a> by Ashish Mohta originally appeared on <a href="http://www.technospot.net/blogs" title="How to use PC and Internet the right way">Technospot.Net </a> on May 21, 2007, 9:18 pm. Please see our <a href="http://www.technospot.net/blogs/copyright-regulations/">terms for use</a> of feeds.</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.technospot.net/blogs/linq-tutorial-with-dot-net-framework-30/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
