<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>John Anderson ( sontek )</title>
    <description>C#, ASP.NET, Azure, and Silverlight</description>
    <link>http://www.sontek.net/</link>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>BlogEngine.NET 1.5.0.7</generator>
    <language>en-US</language>
    <blogChannel:blogRoll>http://www.sontek.net/opml.axd</blogChannel:blogRoll>
    <blogChannel:blink>http://www.dotnetblogengine.net/syndication.axd</blogChannel:blink>
    <dc:creator>John Anderson</dc:creator>
    <dc:title>John Anderson ( sontek )</dc:title>
    <geo:lat>0.000000</geo:lat>
    <geo:long>0.000000</geo:long>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/sontek" type="application/rss+xml" /><item>
      <title>Python with a modular IDE (Vim)</title>
      <description>&lt;p&gt;On Thursday, May 9th, 2008 the Utah Python User Group decided to settle the debate that has plagued us developers since the beginning of time: If you were a programming language, what editor would you use?&lt;/p&gt;
&lt;p&gt;I was tasked with showing Eclipse with the PyDev plugin in all its glory&amp;ndash;but we all know&amp;ndash;&lt;a href="http://sontek.net/blog_pictures/rambo.jpg"&gt;real&lt;/a&gt; &lt;a href="http://sontek.net/blog_pictures/bruce_willis.jpg"&gt;men&lt;/a&gt; / &lt;a href="http://sontek.net/blog_pictures/jason_statham.jpg"&gt;developers&lt;/a&gt; don&amp;rsquo;t use IDE&amp;rsquo;s, so we are going to talk about using Python and Vim together, reaching a state of Zen that the Dalai LLama would be jealous of and establishing more Feng Shui than Martha Stewart&amp;rsquo;s Kitchen.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Freely jump between your code and python class libraries&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;There are 2 ways to add your ability to jump between python class libraries, the first is to setup vim to know where the Python libs are so you can use &amp;lsquo;gf&amp;rsquo; to get to them (gf is goto file). You can do this by adding this snippet to your .vimrc:&lt;/p&gt;
&lt;pre&gt;python &amp;lt;&amp;lt; EOF
import os
import sys
import vim
for p in sys.path:
    if os.path.isdir(p):
        vim.command(r"set path+=%s" % (p.replace(" ", r"\ ")))
EOF&lt;/pre&gt;
&lt;p&gt;With that snippet you will be able to go to your import statements and hit &amp;lsquo;gf&amp;rsquo; on one of them and it&amp;rsquo;ll jump you to that file.&lt;/p&gt;
&lt;p&gt;Continuing accessibility of the Python class libraries we are going to want to use &lt;a href="http://ctags.sourceforge.net/'"&gt;ctags&lt;/a&gt; to generate an index of all the code for vim to reference:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$ ctags -R -f ~/.vim/tags/python.ctags /usr/lib/python2.5/&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;and then in your .vimrc&lt;/p&gt;
&lt;p&gt;&lt;code&gt;set tags+=$HOME/.vim/tags/python.ctags&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This will give you the ability to use CTRL+] to jump to the method/property under your cursor in the system libraries and CTRL+T to jump back to your source code.&lt;/p&gt;
&lt;p&gt;I also have 2 tweaks in my .vimrc so you can use CTRL+LeftArrow and CTRL+RightArrow to move between the files with more natural key bindings.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;map &amp;lt;silent&amp;gt;&amp;lt;C-Left&amp;gt; &amp;lt;C-T&amp;gt;      &lt;br /&gt;map &amp;lt;silent&amp;gt;&amp;lt;C-Right&amp;gt; &amp;lt;C-]&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You can also see all the tags you&amp;rsquo;ve been to with &amp;ldquo;:tags&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Code Completion&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To enable code completion support for Python in Vim you should be able to add the following line to your .vimrc:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;autocmd FileType python set omnifunc=pythoncomplete#Complete&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;but this relies on the fact that your distro compiled python support into vim (which they should!).&lt;/p&gt;
&lt;p&gt;Then all you have to do to use your code completion is hit the unnatural, wrist breaking, keystrokes CTRL+X, CTRL+O. I&amp;rsquo;ve re-bound the code completion to CTRL+Space since we are making vim an IDE! Add this command to your .vimrc to get the better keybinding:&lt;/p&gt;
&lt;p&gt;inoremap &amp;lt;Nul&amp;gt; &amp;lt;C-x&amp;gt;&amp;lt;C-o&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Documentation&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;No IDE is complete without the ability to access the class libraries documentation! You&amp;rsquo;ll need to grab &lt;a href="http://www.vim.org/scripts/script.php?script_id=910"&gt;this&lt;/a&gt; vim plugin. This gives you the ability to type :Pydoc os.path or use the keystrokes &amp;lt;Leader&amp;gt;pw and &amp;lt;Leader&amp;gt;pW to search for the item under the cursor. (Vim&amp;rsquo;s default &amp;lt;Leader&amp;gt; is &amp;ldquo;\&amp;rdquo;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Syntax Checking&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Vim already has built in syntax highlighting for python but I have a small tweak to vim to give you notifications of small syntax errors like forgetting a colon after a for loop. Create a file called ~/.vim/syntax/python.vim and add the following into it:    &lt;br /&gt;&lt;code&gt; &lt;br /&gt;syn match pythonError "^\s*def\s\+\w\+(.*)\s*$" display       &lt;br /&gt;syn match pythonError "^\s*class\s\+\w\+(.*)\s*$" display       &lt;br /&gt;syn match pythonError "^\s*for\s.*[^:]$&amp;rdquo; display       &lt;br /&gt;syn match pythonError &amp;ldquo;^\s*except\s*$&amp;rdquo; display       &lt;br /&gt;syn match pythonError &amp;ldquo;^\s*finally\s*$&amp;rdquo; display       &lt;br /&gt;syn match pythonError &amp;ldquo;^\s*try\s*$&amp;rdquo; display       &lt;br /&gt;syn match pythonError &amp;ldquo;^\s*else\s*$&amp;rdquo; display       &lt;br /&gt;syn match pythonError &amp;ldquo;^\s*else\s*[^:].*&amp;rdquo; display       &lt;br /&gt;syn match pythonError &amp;ldquo;^\s*if\s.*[^\:]$&amp;rdquo; display       &lt;br /&gt;syn match pythonError &amp;ldquo;^\s*except\s.*[^\:]$&amp;rdquo; display       &lt;br /&gt;syn match pythonError &amp;ldquo;[;]$&amp;rdquo; display       &lt;br /&gt;syn keyword pythonError&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do       &lt;br /&gt;&lt;/code&gt; &lt;br /&gt;Now that you have the basics covered, lets get more complicated checking added. Add these 2 lines to your .vimrc so you can type :make and get a list of syntax errors:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;autocmd BufRead *.py set makeprg=python\ -c\ \"import\ py_compile,sys;\ sys.stderr=sys.stdout;\ py_compile.compile(r'%')\"      &lt;br /&gt;autocmd BufRead *.py set efm=%C\ %.%#,%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,%Z%[%^\ ]%\\@=%m       &lt;br /&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You will have the ability to to type :cn and :cp to move around the error list. You can also type :clist to see all the errors, and finally, sometimes you will want to check the syntax of small chunks of code, so we&amp;rsquo;ll add the ability to execute visually selected lines of code, add this snippet to your .vimrc:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;python &amp;lt;&amp;lt; EOL      &lt;br /&gt;import vim       &lt;br /&gt;def EvaluateCurrentRange():       &lt;br /&gt;eval(compile('\n'.join(vim.current.range),'','exec'),globals())       &lt;br /&gt;EOL       &lt;br /&gt;map &amp;lt;C-h&amp;gt; :py EvaluateCurrentRange()       &lt;br /&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Now you will be able to visually select a method/class and execute it by hitting &amp;ldquo;Ctrl+h&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Browsing the source&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Moving around the source code is an important feature in most IDE&amp;rsquo;s with their project explorers, so to get that type of functionality in vim we grab the &lt;a href="http://vim-taglist.sourceforge.net/"&gt;Tag List&lt;/a&gt;plugin. This will give you the ability to view all opened buffers easily and jump to certain method calls in those buffers.&lt;/p&gt;
&lt;p&gt;The other must-have feature of an IDE when browsing code is being able to open up multiple files in tabs. To do this you type :tabnew to open up a file in a new tab and than :tabn and :tabp to move around the tabs. Add these to lines to your .vimrc to be able to move between the tabs with ALT+LeftArrow and ALT+RightArrow:&lt;/p&gt;
&lt;p&gt;&lt;code&gt; &lt;br /&gt;map &amp;lt;silent&amp;gt;&amp;lt;A-Right&amp;gt; :tabnext&amp;lt;CR&amp;gt;       &lt;br /&gt;map &amp;lt;silent&amp;gt;&amp;lt;A-Left&amp;gt; :tabprevious&amp;lt;CR&amp;gt;       &lt;br /&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Debugging&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To add debugging support into vim, we use the pdb module. Add this to your ~/.vim/ftplugin/python.vim to have the ability to quickly add break points and clear them out when you are done debugging:&lt;/p&gt;
&lt;pre&gt;python &amp;lt;&amp;lt; EOF
def SetBreakpoint():
    import re
    nLine = int( vim.eval( 'line(".")'))

    strLine = vim.current.line
    strWhite = re.search( '^(\s*)', strLine).group(1)

    vim.current.buffer.append(
       "%(space)spdb.set_trace() %(mark)s Breakpoint %(mark)s" %
         {'space':strWhite, 'mark': '#' * 30}, nLine - 1)

    for strLine in vim.current.buffer:
        if strLine == "import pdb":
            break
    else:
        vim.current.buffer.append( 'import pdb', 0)
        vim.command( 'normal j1')

vim.command( 'map &amp;lt;f7&amp;gt; :py SetBreakpoint()&amp;lt;cr&amp;gt;')

def RemoveBreakpoints():
    import re

    nCurrentLine = int( vim.eval( 'line(".")'))

    nLines = []
    nLine = 1
    for strLine in vim.current.buffer:
        if strLine == &amp;lsquo;import pdb&amp;rsquo; or strLine.lstrip()[:15] == &amp;lsquo;pdb.set_trace()&amp;rsquo;:
            nLines.append( nLine)
        nLine += 1

    nLines.reverse()

    for nLine in nLines:
        vim.command( &amp;lsquo;normal %dG&amp;rsquo; % nLine)
        vim.command( &amp;lsquo;normal dd&amp;rsquo;)
        if nLine &amp;lt; nCurrentLine:
            nCurrentLine -= 1

    vim.command( &amp;lsquo;normal %dG&amp;rsquo; % nCurrentLine)

vim.command( &amp;lsquo;map &amp;lt;s-f7&amp;gt; :py RemoveBreakpoints()&amp;lt;cr&amp;gt;&amp;rsquo;)
EOF&lt;/pre&gt;
&lt;p&gt;With that code you can now hit F7 and Shift-F7 to add/remove breakpoints. Then you just launch your application with !python % (percent being the current file, you can declare your main file here if its different).&lt;/p&gt;
&lt;p&gt;Another tweak I use is to have my vim inside screen with a horizontal split, that way I can see the python interpreter and debug while still having vim there so I can easily fix my code.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Snippets&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A great time saver with standard IDE&amp;rsquo;s is code snippets, so you can type a few key strokes and get a lot of code out of it. An example of this would be a django model, instead of typing out the complete declaration you could type &amp;lsquo;mmo&amp;lt;tab&amp;gt;&amp;lt;tab&amp;gt;&amp;rsquo; and have a skeleton of your model done for you. To do this in vim we grab the &lt;a href="http://www.vim.org/scripts/script.php?script_id=1318"&gt;Snippets EMU&lt;/a&gt; plugin.&lt;/p&gt;
&lt;p&gt;Check out a great screencast of snippetsEmu in action &lt;a href="http://ttyshare.com/rec/mopemope/3716682/"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Emacs&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.enigmacurry.com/2008/05/09/emacs-as-a-powerful-python-ide/"&gt;Here&lt;/a&gt; is a great post on how to do the same with Emacs.&lt;/p&gt;&lt;a target="_blank" href="http://www.dotnetkicks.com/kick/?url=http://www.sontek.net/post/Python-with-a-modular-IDE-(Vim).aspx&amp;amp;title=Python with a modular IDE (Vim)"&gt;
                    &lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://www.sontek.net/post/Python-with-a-modular-IDE-(Vim).aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;
                  &lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/sontek/~4/Kdl4XcoMv8U" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/sontek/~3/Kdl4XcoMv8U/post.aspx</link>
      <author>sontek</author>
      <comments>http://www.sontek.net/post/Python-with-a-modular-IDE-(Vim).aspx#comment</comments>
      <guid isPermaLink="false">http://www.sontek.net/post.aspx?id=c54bee78-f632-4982-85d3-2e2ac13f4ada</guid>
      <pubDate>Wed, 24 Jun 2009 23:48:00 +0300</pubDate>
      <category>Python</category>
      <category>Vim</category>
      <dc:publisher>sontek</dc:publisher>
      <pingback:server>http://www.sontek.net/pingback.axd</pingback:server>
      <pingback:target>http://www.sontek.net/post.aspx?id=c54bee78-f632-4982-85d3-2e2ac13f4ada</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.sontek.net/trackback.axd?id=c54bee78-f632-4982-85d3-2e2ac13f4ada</trackback:ping>
      <wfw:comment>http://www.sontek.net/post/Python-with-a-modular-IDE-(Vim).aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sontek.net/syndication.axd?post=c54bee78-f632-4982-85d3-2e2ac13f4ada</wfw:commentRss>
    <feedburner:origLink>http://www.sontek.net/post.aspx?id=c54bee78-f632-4982-85d3-2e2ac13f4ada</feedburner:origLink></item>
    <item>
      <title>Creating an XSL Extension in C#</title>
      <description>&lt;p&gt;Although XSL is very powerful, I’m sometimes more comfortable with doing certain operations in C# and luckily it is pretty simple to call C# libraries from XSL.&lt;/p&gt;  &lt;p&gt;First, you’ll need the code that you will call from XSL, this can just be a normal POCO, doesn’t have to be anything specific to XML/XSL:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; StringExtension
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    {
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Proper(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; data)
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            CultureInfo cultureInfo = Thread.CurrentThread.CurrentCulture;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            TextInfo textInfo = cultureInfo.TextInfo;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; textInfo.ToTitleCase(data.ToLower());
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    }&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Then you need to use the XsltArgumentList class to add an extension object to your Xsl Transform:&lt;/p&gt;

&lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;   &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Program
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    {
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Main()
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            XPathDocument doc = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; XPathDocument(&amp;quot;&lt;span style="color: #8b0000"&gt;data.xml&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            XslCompiledTransform trans = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; XslCompiledTransform();
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            StringBuilder sb = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; StringBuilder();
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            StringWriter sw = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; StringWriter(sb);
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            trans.Load(&amp;quot;&lt;span style="color: #8b0000"&gt;stylesheet.xslt&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            XsltArgumentList args = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; XsltArgumentList();
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            StringExtension ext = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; StringExtension();
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            args.AddExtensionObject(&amp;quot;&lt;span style="color: #8b0000"&gt;ext&lt;/span&gt;&amp;quot;, ext);
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            trans.Transform(doc, args, sw);
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            Console.WriteLine(sw.ToString());
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            Console.ReadLine();
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    }&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Now all you have to do is register the namespace in your XSL (i.e xmlns:”ext”) and you can use the extension by calling ext:Proper():&lt;/p&gt;

&lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;?&lt;/span&gt;xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;&lt;span style="color: #0000ff"&gt;?&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #c71585"&gt;xsl&lt;/span&gt;:&lt;span style="color: #800000"&gt;stylesheet&lt;/span&gt; &lt;span style="color: #ff0000"&gt;version&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;1.0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;xmlns&lt;/span&gt;:&lt;span style="color: #ff0000"&gt;xsl&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;http://www.w3.org/1999/XSL/Transform&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #ff0000"&gt;xmlns&lt;/span&gt;:&lt;span style="color: #ff0000"&gt;msxsl&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;urn:schemas-microsoft-com:xslt&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;exclude&lt;/span&gt;-&lt;span style="color: #ff0000"&gt;result&lt;/span&gt;-&lt;span style="color: #ff0000"&gt;prefixes&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;msxsl&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #ff0000"&gt;xmlns&lt;/span&gt;:&lt;span style="color: #ff0000"&gt;ext&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;ext&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; &lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #c71585"&gt;xsl&lt;/span&gt;:&lt;span style="color: #800000"&gt;output&lt;/span&gt; &lt;span style="color: #ff0000"&gt;method&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;indent&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;yes&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #c71585"&gt;xsl&lt;/span&gt;:&lt;span style="color: #800000"&gt;template&lt;/span&gt; &lt;span style="color: #ff0000"&gt;match&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;/&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #c71585"&gt;xsl&lt;/span&gt;:&lt;span style="color: #800000"&gt;for&lt;/span&gt;-&lt;span style="color: #ff0000"&gt;each&lt;/span&gt; &lt;span style="color: #ff0000"&gt;select&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;People/Person&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;      First Name: &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #c71585"&gt;xsl&lt;/span&gt;:&lt;span style="color: #800000"&gt;value&lt;/span&gt;-&lt;span style="color: #ff0000"&gt;of&lt;/span&gt; &lt;span style="color: #ff0000"&gt;select&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;ext:Proper(@FirstName)&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;br&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;      Last Name: &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #c71585"&gt;xsl&lt;/span&gt;:&lt;span style="color: #800000"&gt;value&lt;/span&gt;-&lt;span style="color: #ff0000"&gt;of&lt;/span&gt; &lt;span style="color: #ff0000"&gt;select&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;ext:Proper(@LastName)&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;br&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #c71585"&gt;xsl&lt;/span&gt;:&lt;span style="color: #800000"&gt;for&lt;/span&gt;-each&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #c71585"&gt;xsl&lt;/span&gt;:&lt;span style="color: #800000"&gt;template&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #c71585"&gt;xsl&lt;/span&gt;:&lt;span style="color: #800000"&gt;stylesheet&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;a target="_blank" href="http://www.dotnetkicks.com/kick/?url=http://www.sontek.net/post/Creating-an-XSL-Extension-in-C.aspx&amp;amp;title=Creating an XSL Extension in C#"&gt;
                    &lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://www.sontek.net/post/Creating-an-XSL-Extension-in-C.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;
                  &lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/sontek/~4/KhOgk5dcRog" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/sontek/~3/KhOgk5dcRog/post.aspx</link>
      <author>sontek</author>
      <comments>http://www.sontek.net/post/Creating-an-XSL-Extension-in-C.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sontek.net/post.aspx?id=42755802-1b46-4aab-aee9-468c065f9338</guid>
      <pubDate>Tue, 23 Jun 2009 12:06:00 +0300</pubDate>
      <category>C#</category>
      <category>XML</category>
      <category>XSL</category>
      <dc:publisher>sontek</dc:publisher>
      <pingback:server>http://www.sontek.net/pingback.axd</pingback:server>
      <pingback:target>http://www.sontek.net/post.aspx?id=42755802-1b46-4aab-aee9-468c065f9338</pingback:target>
      <slash:comments>2</slash:comments>
      <trackback:ping>http://www.sontek.net/trackback.axd?id=42755802-1b46-4aab-aee9-468c065f9338</trackback:ping>
      <wfw:comment>http://www.sontek.net/post/Creating-an-XSL-Extension-in-C.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sontek.net/syndication.axd?post=42755802-1b46-4aab-aee9-468c065f9338</wfw:commentRss>
    <feedburner:origLink>http://www.sontek.net/post.aspx?id=42755802-1b46-4aab-aee9-468c065f9338</feedburner:origLink></item>
    <item>
      <title>Command Line Shortcuts for CMD and PowerShell</title>
      <description>&lt;p&gt;Here are some really useful command line shortcuts that I found on a forum awhile back but don't remember now:&lt;/p&gt;
&lt;p&gt;F1 Repeats the letters of the last command line, one by one&lt;br /&gt; F2 Displays a dialog asking user to "enter the char to copy up to" of the last command line&lt;br /&gt; F3 Repeats the last command line&lt;br /&gt; F4 Displays a dialog asking user to "enter the char to delete up to" of the last command line&lt;br /&gt; F5 Goes back one command line&lt;br /&gt; F6 Enters the traditional CTRL+Z (^z)&lt;br /&gt; F7 Displays a menu with the command line history&lt;br /&gt; F8 Cycles back through previous command lines (beginning with most recent)&lt;br /&gt; F9 Displays a dialog asking user to enter a command number, where 0 is for first command line entered&lt;/p&gt;&lt;a target="_blank" href="http://www.dotnetkicks.com/kick/?url=http://www.sontek.net/post/Command-Line-Shortcuts-for-CMD-and-PowerShell.aspx&amp;amp;title=Command Line Shortcuts for CMD and PowerShell"&gt;
                    &lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://www.sontek.net/post/Command-Line-Shortcuts-for-CMD-and-PowerShell.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;
                  &lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/sontek/~4/SzOplxBQsk0" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/sontek/~3/SzOplxBQsk0/post.aspx</link>
      <author>sontek</author>
      <comments>http://www.sontek.net/post/Command-Line-Shortcuts-for-CMD-and-PowerShell.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sontek.net/post.aspx?id=e2e11cd0-035b-4ee2-aead-f600e24746c2</guid>
      <pubDate>Mon, 22 Jun 2009 00:33:00 +0300</pubDate>
      <category>PowerShell</category>
      <category>Windows</category>
      <dc:publisher>sontek</dc:publisher>
      <pingback:server>http://www.sontek.net/pingback.axd</pingback:server>
      <pingback:target>http://www.sontek.net/post.aspx?id=e2e11cd0-035b-4ee2-aead-f600e24746c2</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.sontek.net/trackback.axd?id=e2e11cd0-035b-4ee2-aead-f600e24746c2</trackback:ping>
      <wfw:comment>http://www.sontek.net/post/Command-Line-Shortcuts-for-CMD-and-PowerShell.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sontek.net/syndication.axd?post=e2e11cd0-035b-4ee2-aead-f600e24746c2</wfw:commentRss>
    <feedburner:origLink>http://www.sontek.net/post.aspx?id=e2e11cd0-035b-4ee2-aead-f600e24746c2</feedburner:origLink></item>
    <item>
      <title>ASP.NET Server tags cannot contain &lt;% ... %&gt; constructs</title>
      <description>&lt;p&gt;We've all seen the Server Tags cannot contain &amp;lt;% ... %&amp;gt; constructs which comes from trying to use server side &amp;lt;% .. %&amp;gt; inside a server side control:&lt;/p&gt;
&lt;p&gt;&amp;lt;asp:TextBox runat="server" Text="&amp;lt;%= ConfigurationManager.AppSettings["Title"] %&amp;gt;" /&amp;gt;&lt;/p&gt;
&lt;p&gt;You have a few ways around this, the easiest and most common way is to assign the properties server side:&lt;/p&gt;
&lt;p&gt;this.textBox1.Text = ConfigurationManager.AppSettings["Title"];&lt;/p&gt;
&lt;p&gt;But I like being able to do as much of my property setting in markup as possible so if I ever need to change the property it doesn't require a complete re-build/re-deploy.&lt;/p&gt;
&lt;p&gt;The more elegant/fun solution would be to use an ExpressionBudiler, you've most likely used this class already if you've ever worked with a a multilingual website, to have controls pull globalized text from your resx resources you do the following:&lt;/p&gt;
&lt;p&gt;&amp;lt;asp:Label runat="server"&amp;nbsp;Text="&amp;lt;%$ Resources:Text, ParticipantHeader %&amp;gt;" /&amp;gt;&lt;/p&gt;
&lt;p&gt;This is using a ResourceExpressionBuilder, there is also an AppSettingsExpressionBuilder and a ConnectionStringsExpressBuilder built into the .NET framework that you can use. If these don't do what you want you can always build your own, you can see an example of a custom ExpressionBuilder at the &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.compilation.expressionbuilder.aspx" target="_blank"&gt;MSDN Documentation&lt;/a&gt;.&lt;/p&gt;&lt;a target="_blank" href="http://www.dotnetkicks.com/kick/?url=http://www.sontek.net/post/ASPNET-Server-tags-cannot-contain-3c25-253e-constructs.aspx&amp;amp;title=ASP.NET Server tags cannot contain &lt;% ... %&gt; constructs"&gt;
                    &lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://www.sontek.net/post/ASPNET-Server-tags-cannot-contain-3c25-253e-constructs.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;
                  &lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/sontek/~4/Eu-D6tFyMRk" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/sontek/~3/Eu-D6tFyMRk/post.aspx</link>
      <author>sontek</author>
      <comments>http://www.sontek.net/post/ASPNET-Server-tags-cannot-contain-3c25-253e-constructs.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sontek.net/post.aspx?id=18efa91c-15a8-4408-bdf0-b05363520fba</guid>
      <pubDate>Mon, 22 Jun 2009 00:11:00 +0300</pubDate>
      <category>ASP.NET</category>
      <category>C#</category>
      <dc:publisher>sontek</dc:publisher>
      <pingback:server>http://www.sontek.net/pingback.axd</pingback:server>
      <pingback:target>http://www.sontek.net/post.aspx?id=18efa91c-15a8-4408-bdf0-b05363520fba</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.sontek.net/trackback.axd?id=18efa91c-15a8-4408-bdf0-b05363520fba</trackback:ping>
      <wfw:comment>http://www.sontek.net/post/ASPNET-Server-tags-cannot-contain-3c25-253e-constructs.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sontek.net/syndication.axd?post=18efa91c-15a8-4408-bdf0-b05363520fba</wfw:commentRss>
    <feedburner:origLink>http://www.sontek.net/post.aspx?id=18efa91c-15a8-4408-bdf0-b05363520fba</feedburner:origLink></item>
    <item>
      <title>ASP.NET 4.0 SEO Features</title>
      <description>&lt;p&gt;In the upcoming release of ASP.NET 4.0 they have introduce 2 really nice features for SEO, the first one is being able to progmattically add Meta Keywords and Description to the page:&lt;/p&gt;
&lt;p&gt;Page.MetaDescription = "Foo";&lt;br /&gt;Page.MetaKeywords = "Foo, Bar, Baz";&lt;/p&gt;
&lt;p&gt;Which will render the following in the header:&lt;br /&gt;&lt;span style="font-family: 'Courier New'; font-size: 12px; white-space: pre-wrap;"&gt;&amp;lt;meta name="description" content="Foo" /&amp;gt; &amp;lt;meta name="keywords" content="Foo, Bar, Baz" /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Courier New'; font-size: small;"&gt;&lt;span style="font-size: 12px; white-space: pre-wrap;"&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;&lt;span style="font-size: 10px; white-space: normal;"&gt;The 2nd nice feature added to ASP.NET 4.0 is 301 permanent redirects via the Response.RedirectPermanent("page.aspx") method. So now in your Global.asx.cs you can manage 302 redirects for pages who have moved like this:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;protected void Application_BeginRequest(object sender, EventArgs e)
{
    if (Request.FilePath == "/Product/23.aspx")
    {
        Response.RedirectPermanent("/Products/23/", true);&lt;br /&gt;    }
}
&lt;/pre&gt;
&lt;p&gt;This gives you the ability to easily manage files that are indexed in a search engine but have moved progrmatically rather than doing it through your webserver (which is much better for people who are using shared hosting).&lt;/p&gt;&lt;a target="_blank" href="http://www.dotnetkicks.com/kick/?url=http://www.sontek.net/post/ASPNET-40-SEO-Features.aspx&amp;amp;title=ASP.NET 4.0 SEO Features"&gt;
                    &lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://www.sontek.net/post/ASPNET-40-SEO-Features.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;
                  &lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/sontek/~4/Vx2TblP-VNk" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/sontek/~3/Vx2TblP-VNk/post.aspx</link>
      <author>sontek</author>
      <comments>http://www.sontek.net/post/ASPNET-40-SEO-Features.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sontek.net/post.aspx?id=f16f86e3-1cfc-417a-b632-c58d63b4c18a</guid>
      <pubDate>Sun, 21 Jun 2009 12:32:00 +0300</pubDate>
      <category>ASP.NET</category>
      <category>SEO</category>
      <dc:publisher>sontek</dc:publisher>
      <pingback:server>http://www.sontek.net/pingback.axd</pingback:server>
      <pingback:target>http://www.sontek.net/post.aspx?id=f16f86e3-1cfc-417a-b632-c58d63b4c18a</pingback:target>
      <slash:comments>3</slash:comments>
      <trackback:ping>http://www.sontek.net/trackback.axd?id=f16f86e3-1cfc-417a-b632-c58d63b4c18a</trackback:ping>
      <wfw:comment>http://www.sontek.net/post/ASPNET-40-SEO-Features.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sontek.net/syndication.axd?post=f16f86e3-1cfc-417a-b632-c58d63b4c18a</wfw:commentRss>
    <feedburner:origLink>http://www.sontek.net/post.aspx?id=f16f86e3-1cfc-417a-b632-c58d63b4c18a</feedburner:origLink></item>
    <item>
      <title>jQuery Ribbon Control</title>
      <description>&lt;p&gt;Mikael S&amp;ouml;derstr&amp;ouml;m has created a ribbon control using jQuery, it is very impressive and will be greate to give your online applications a similar feel to what people are used to on the desktop. You can download it &lt;a href="http://jqueryribbon.codeplex.com/" target="_blank"&gt;here&lt;/a&gt; and can see a demo &lt;a href="http://vinkr.net/ribbon" target="_blank"&gt;here&lt;/a&gt; &lt;br /&gt;&lt;br /&gt; &lt;img src="http://www.sontek.net/downloads/images/jquery_ribbon.png" alt="screen shot of ribbon control" /&gt;&lt;/p&gt;&lt;a target="_blank" href="http://www.dotnetkicks.com/kick/?url=http://www.sontek.net/post/jQuery-Ribbon-Control.aspx&amp;amp;title=jQuery Ribbon Control"&gt;
                    &lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://www.sontek.net/post/jQuery-Ribbon-Control.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;
                  &lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/sontek/~4/rbm9NYvbm60" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/sontek/~3/rbm9NYvbm60/post.aspx</link>
      <author>sontek</author>
      <comments>http://www.sontek.net/post/jQuery-Ribbon-Control.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sontek.net/post.aspx?id=36be2a41-e282-411f-9ed4-e71c92aaf5d6</guid>
      <pubDate>Sat, 20 Jun 2009 00:30:00 +0300</pubDate>
      <category>Javascript</category>
      <category>jQuery</category>
      <dc:publisher>sontek</dc:publisher>
      <pingback:server>http://www.sontek.net/pingback.axd</pingback:server>
      <pingback:target>http://www.sontek.net/post.aspx?id=36be2a41-e282-411f-9ed4-e71c92aaf5d6</pingback:target>
      <slash:comments>2</slash:comments>
      <trackback:ping>http://www.sontek.net/trackback.axd?id=36be2a41-e282-411f-9ed4-e71c92aaf5d6</trackback:ping>
      <wfw:comment>http://www.sontek.net/post/jQuery-Ribbon-Control.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sontek.net/syndication.axd?post=36be2a41-e282-411f-9ed4-e71c92aaf5d6</wfw:commentRss>
    <feedburner:origLink>http://www.sontek.net/post.aspx?id=36be2a41-e282-411f-9ed4-e71c92aaf5d6</feedburner:origLink></item>
    <item>
      <title>IIS SEO Optimization Extension</title>
      <description>Microsoft has released a new tool for IIS 7 that will help us developers analyze our website and find out if we have any SEO issues. Along with the analytical tools it provides it also has an easy UI for managing sitemap's and robot.txt.  You can download it &lt;a href="http://www.iis.net/extensions/SEOToolkit" target="_blank"&gt;here&lt;/a&gt;
&lt;br /&gt;&lt;br /&gt;
Scott Guthrie has a great introduction article on how to use it &lt;a href="http://weblogs.asp.net/scottgu/archive/2009/06/03/iis-search-engine-optimization-toolkit.aspx" target="_blank"&gt;here&lt;/a&gt;&lt;a target="_blank" href="http://www.dotnetkicks.com/kick/?url=http://www.sontek.net/post/IIS-SEO-Optimization-Extension.aspx&amp;amp;title=IIS SEO Optimization Extension"&gt;
                    &lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://www.sontek.net/post/IIS-SEO-Optimization-Extension.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;
                  &lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/sontek/~4/SXZzWDv2j7o" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/sontek/~3/SXZzWDv2j7o/post.aspx</link>
      <author>sontek</author>
      <comments>http://www.sontek.net/post/IIS-SEO-Optimization-Extension.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sontek.net/post.aspx?id=d5a4510f-1c76-4179-967e-77143ece1e9b</guid>
      <pubDate>Fri, 19 Jun 2009 10:15:00 +0300</pubDate>
      <dc:publisher>sontek</dc:publisher>
      <pingback:server>http://www.sontek.net/pingback.axd</pingback:server>
      <pingback:target>http://www.sontek.net/post.aspx?id=d5a4510f-1c76-4179-967e-77143ece1e9b</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.sontek.net/trackback.axd?id=d5a4510f-1c76-4179-967e-77143ece1e9b</trackback:ping>
      <wfw:comment>http://www.sontek.net/post/IIS-SEO-Optimization-Extension.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sontek.net/syndication.axd?post=d5a4510f-1c76-4179-967e-77143ece1e9b</wfw:commentRss>
    <feedburner:origLink>http://www.sontek.net/post.aspx?id=d5a4510f-1c76-4179-967e-77143ece1e9b</feedburner:origLink></item>
    <item>
      <title>Targeting Mono on Visual Studio 2010 for C# and ASP.NET Projects</title>
      <description>In Visual Studio 2010 they added much better support for targeting multiple frameworks, allowing us to target .NET 2.0 and 4.0 from the same solution, which also gives us the ability to target runtime's such as Mono.
&lt;br /&gt;&lt;br /&gt;
Jonathon Pobst has done all the work needed, so download his template from &lt;a href="http://jpobst.blogspot.com/2009/06/mono-in-visual-studio-2010.html" target="_blank"&gt;here&lt;/a&gt; and you are good to go!
&lt;br /&gt;&lt;br /&gt;
I've also mirrored his template &lt;a href="http://www.sontek.net/downloads/MonoProfile2_4.zip"&gt;here&lt;/a&gt; in case his site goes down. Just extract the file to C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile and tell your project to target mono!&lt;a target="_blank" href="http://www.dotnetkicks.com/kick/?url=http://www.sontek.net/post/Targeting-Mono-on-Visual-Studio-2010-for-C-and-ASPNET-Projects.aspx&amp;amp;title=Targeting Mono on Visual Studio 2010 for C# and ASP.NET Projects"&gt;
                    &lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://www.sontek.net/post/Targeting-Mono-on-Visual-Studio-2010-for-C-and-ASPNET-Projects.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;
                  &lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/sontek/~4/nAm3I4kA9tM" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/sontek/~3/nAm3I4kA9tM/post.aspx</link>
      <author>sontek</author>
      <comments>http://www.sontek.net/post/Targeting-Mono-on-Visual-Studio-2010-for-C-and-ASPNET-Projects.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sontek.net/post.aspx?id=43ada328-2294-488c-be85-8361f68bd598</guid>
      <pubDate>Thu, 18 Jun 2009 07:01:00 +0300</pubDate>
      <category>ASP.NET</category>
      <category>C#</category>
      <category>Mono</category>
      <category>Visual Studio</category>
      <dc:publisher>sontek</dc:publisher>
      <pingback:server>http://www.sontek.net/pingback.axd</pingback:server>
      <pingback:target>http://www.sontek.net/post.aspx?id=43ada328-2294-488c-be85-8361f68bd598</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://www.sontek.net/trackback.axd?id=43ada328-2294-488c-be85-8361f68bd598</trackback:ping>
      <wfw:comment>http://www.sontek.net/post/Targeting-Mono-on-Visual-Studio-2010-for-C-and-ASPNET-Projects.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sontek.net/syndication.axd?post=43ada328-2294-488c-be85-8361f68bd598</wfw:commentRss>
    <feedburner:origLink>http://www.sontek.net/post.aspx?id=43ada328-2294-488c-be85-8361f68bd598</feedburner:origLink></item>
    <item>
      <title>Windows Hater</title>
      <description>&lt;p&gt;So I've become a huge fan of &lt;a href="http://linuxhaters.blogspot.com/"&gt;Linux Haters&lt;/a&gt; blog because he makes some very valid points about Linux and the open source community in general and it got me thinking of why I moved from Windows to Linux in the first place.&lt;/p&gt; 
&lt;p&gt;Picture this, you just bought built a brand new computer and want to install the brand spankin' new Windows Vista Ultimate, you plop down $300, and away you go! What does $300 get you? A bare minimum operating system with nothing but MS Paint and Media Player.&lt;/p&gt; 
&lt;p&gt;So you spend the next 45 minutes installing your bare minimum operating system, it takes 45 minutes because the initial install is 15gb, so by bare minimum I mean feature set, not file size. So after you get installed you try to use the Internet and realize that it didn't detect any of your hardware (video, audio, network), so you spend the next 2 hours spidering through multiple vendor's websites who all have their downloads/driver section in different areas.&lt;/p&gt; 
&lt;p&gt;Now you have all your drivers downloaded, you go to install them to find out that the majority of the installers only extracted the files to your disk, they didn't install them, the installer did not tell you they were only extracting, nor did they tell you where they were extracting them to. So after searching your disk and finding the extracted files you go into the folder to figure out what needs to be done to install them, but that is a waste of time since the vendor didn't feel the need to write a README file. Being the genius that you are, you right click on My Computer -&amp;gt; Hardware -&amp;gt; Device Manager (because that was an intuitive place to look, thats the first place I thought of going to install drivers!) and now you are prompted with a dialog with a list of &amp;#8220;Unkown Device&amp;#8221; with little exclamation point next them. What to do? Easy! You right click on it, go to properties -&amp;gt; details and look at the very intuitive and easy to read string PCI/VEN_1002&amp;DEV_AA08&amp;SUBSYS_AA081545&amp;REV_00\4&amp;1245FE7B&amp;0&amp;0108&amp; and go to http://pciids.sf.net and search for each device so you can figure out what driver to install for it.&lt;/p&gt; 
&lt;p&gt;After you have all your device drivers installed and can utilize all your hardware, you'll want to go to Windows Update to make sure your computer is completely secure. You run the first batch of updates and it asks you to reboot, when it comes back up it doesn't tell you all your updates weren't finished, but using your spidey sense, you know that couldn't have been all! So you go back to windows update to find a whole mess of updates waiting for you, these ones will also ask you to reboot (and so will the next 3 or 4 groups of updates). Rebooting is good for your new system, gets it warmed up.&lt;/p&gt; 
&lt;p&gt;4 reboots and 230 updates later you decide you would like to edit some family photos for your Christmas postcards; no problem-Vista comes with the all powerful MS Paint, which can do everything you'd ever want to do, just check out what this guy did with it: &lt;a href="http://www.techepics.com/files/beautiful_mspaint_artwork_t.jpg"&gt;MS Paint Skills!&lt;/a&gt;.&lt;/p&gt; 
&lt;p&gt;Editing family photos was fun but now you would like to add everyones birthday to your calendar and setup some re-occurring tasks to remind you to take out the trash and pay bills on time, but you'll soon have shut off notices and piled high garbage because there is no default calendaring program in Windows! But your boss will save the day, he just called and needs your latest TPS Report so you need go to open up your spreadsheet but you find out there is no spreadsheet program either, so you hike down to your local computer shop and plop down $300 for the office suite with the added benefit of having outlook (yay a Calendar for $300!!).&lt;/p&gt; 
&lt;p&gt;Spend the next 30 minutes to install Office (yes, office takes about as long to install as your whole operating system, but office is more powerful than your OS, so its O.K), after office is installed and you update your TPS report and send it to your boss you decide you'd like to create a vlog (Video Log) and post it on youtube, but as you'll soon find out, Movie Maker isn't going to be the easiest thing to locate.&lt;a href="http://www.boingboing.net/2008/06/25/bill-gates-2003-flam.html"&gt;Bill Gates can't even find it.&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;Six hundred dollars and 7 hours later you have an almost usable computer, you still can't watch DIVX or DVDs, burn Audio CD's, Balance your checkbook, Sync your phone to your calendar and e-mail, or entertain your children with any games but minesweeper or solitaire. You don't even have a virus scan program yet!&lt;/p&gt; 
&lt;p&gt;I probably went around the block just to get next door, but my point is that after a simple 20 minute install of any popular Linux distribution I can do all of the things I've listed above. They come with the majority of hardware supported out of the box, an office suite (open office, abiword, gnumeric, evolution, etc), multiple graphic tools (gimp, inkscape), easy package manager that handles updates without multiple reboots (rpm, yum, yast, zypper, apt-get, package kit), video recording program (cheese), cd burner (Brasero, Wodim), lots of fun games, and the ability to balance your checkbook with GNU Cash.&lt;/p&gt; &lt;a target="_blank" href="http://www.dotnetkicks.com/kick/?url=http://www.sontek.net/post/Windows-Hater.aspx&amp;amp;title=Windows Hater"&gt;
                    &lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://www.sontek.net/post/Windows-Hater.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;
                  &lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/sontek/~4/_P1K7J16Kd4" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/sontek/~3/_P1K7J16Kd4/post.aspx</link>
      <author>sontek</author>
      <comments>http://www.sontek.net/post/Windows-Hater.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sontek.net/post.aspx?id=5836f841-0bb4-4da8-a657-d1b97528edb9</guid>
      <pubDate>Tue, 08 Jul 2008 01:27:00 +0300</pubDate>
      <category>Windows</category>
      <dc:publisher>sontek</dc:publisher>
      <pingback:server>http://www.sontek.net/pingback.axd</pingback:server>
      <pingback:target>http://www.sontek.net/post.aspx?id=5836f841-0bb4-4da8-a657-d1b97528edb9</pingback:target>
      <slash:comments>5</slash:comments>
      <trackback:ping>http://www.sontek.net/trackback.axd?id=5836f841-0bb4-4da8-a657-d1b97528edb9</trackback:ping>
      <wfw:comment>http://www.sontek.net/post/Windows-Hater.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sontek.net/syndication.axd?post=5836f841-0bb4-4da8-a657-d1b97528edb9</wfw:commentRss>
    <feedburner:origLink>http://www.sontek.net/post.aspx?id=5836f841-0bb4-4da8-a657-d1b97528edb9</feedburner:origLink></item>
    <item>
      <title>OnLoad vs Page_Load in ASP.NET</title>
      <description>Most ASP.NET developers are happy with using the default template that Visual Studio gives them for code behind which handles the Page_Load event. This is just weird because you are subscribing to your own event. 

In my opinion the better approach would be override the OnLoad event, this gets rid of the overhead of attaching to the event and firing the delegate but it also gives you better intellisense support. In VB.NET you have helpful menu's for subscribing to page events but in C# the only way to get those helpful menu's is to use inline code. 

The only caveat for using this approach is that the override keyword implies that you want to change the behavior of OnLoad which is not true, you simply want to setup the page. In fact you will still need to call base.OnLoad() so that the Page_Load event fires because you want to make sure that any other EventHandlers for Page_Load are called.&lt;a target="_blank" href="http://www.dotnetkicks.com/kick/?url=http://www.sontek.net/post/OnLoad-vs-Page_Load-in-ASPNET.aspx&amp;amp;title=OnLoad vs Page_Load in ASP.NET"&gt;
                    &lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://www.sontek.net/post/OnLoad-vs-Page_Load-in-ASPNET.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;
                  &lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/sontek/~4/Uhn95aQWlIY" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/sontek/~3/Uhn95aQWlIY/post.aspx</link>
      <author>sontek</author>
      <comments>http://www.sontek.net/post/OnLoad-vs-Page_Load-in-ASPNET.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sontek.net/post.aspx?id=600bfa23-3a56-4dca-9d6f-d118ae35a50a</guid>
      <pubDate>Thu, 25 Jan 2007 01:38:00 +0300</pubDate>
      <category>ASP.NET</category>
      <category>C#</category>
      <dc:publisher>sontek</dc:publisher>
      <pingback:server>http://www.sontek.net/pingback.axd</pingback:server>
      <pingback:target>http://www.sontek.net/post.aspx?id=600bfa23-3a56-4dca-9d6f-d118ae35a50a</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.sontek.net/trackback.axd?id=600bfa23-3a56-4dca-9d6f-d118ae35a50a</trackback:ping>
      <wfw:comment>http://www.sontek.net/post/OnLoad-vs-Page_Load-in-ASPNET.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sontek.net/syndication.axd?post=600bfa23-3a56-4dca-9d6f-d118ae35a50a</wfw:commentRss>
    <feedburner:origLink>http://www.sontek.net/post.aspx?id=600bfa23-3a56-4dca-9d6f-d118ae35a50a</feedburner:origLink></item>
  </channel>
</rss>
