<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>EricDotNet</title>
	<atom:link href="http://ericdotnet.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ericdotnet.wordpress.com</link>
	<description>My .net adventures</description>
	<lastBuildDate>Sat, 08 Aug 2009 07:07:16 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='ericdotnet.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/9dd5ac2912fac1401552ed976ca533ea?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>EricDotNet</title>
		<link>http://ericdotnet.wordpress.com</link>
	</image>
			<item>
		<title>jqGrid Package</title>
		<link>http://ericdotnet.wordpress.com/2009/08/08/jqgrid-package/</link>
		<comments>http://ericdotnet.wordpress.com/2009/08/08/jqgrid-package/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 06:52:19 +0000</pubDate>
		<dc:creator>ericdotnet</dc:creator>
				<category><![CDATA[jquery]]></category>
		<category><![CDATA[jqgrid]]></category>

		<guid isPermaLink="false">http://ericdotnet.wordpress.com/?p=110</guid>
		<description><![CDATA[A complete package is now available at http://www.jqgrid.com. This was mentioned in a comment on my post about jqgrid, but I thought it was worth a mention here  .
Enjoy !
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ericdotnet.wordpress.com&blog=953062&post=110&subd=ericdotnet&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A complete package is now available at <a href="http://www.jqgrid.com">http://www.jqgrid.com</a>. This was mentioned in a comment on my post about jqgrid, but I thought it was worth a mention here <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>Enjoy !</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ericdotnet.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ericdotnet.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ericdotnet.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ericdotnet.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ericdotnet.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ericdotnet.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ericdotnet.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ericdotnet.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ericdotnet.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ericdotnet.wordpress.com/110/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ericdotnet.wordpress.com&blog=953062&post=110&subd=ericdotnet&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ericdotnet.wordpress.com/2009/08/08/jqgrid-package/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5a0f3d36a591e41b7dadd07c5f182a51?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">ericdotnet</media:title>
		</media:content>
	</item>
		<item>
		<title>Devexpress Asp.net MVC Grid</title>
		<link>http://ericdotnet.wordpress.com/2009/06/22/devexpress-asp-net-mvc-grid/</link>
		<comments>http://ericdotnet.wordpress.com/2009/06/22/devexpress-asp-net-mvc-grid/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 15:53:09 +0000</pubDate>
		<dc:creator>ericdotnet</dc:creator>
				<category><![CDATA[asp.net mvc]]></category>
		<category><![CDATA[devexpress]]></category>

		<guid isPermaLink="false">http://ericdotnet.wordpress.com/2009/06/22/devexpress-asp-net-mvc-grid/</guid>
		<description><![CDATA[At work we work with Devexpress components for our windows applications. And I have used some like the pivotgrid and the reporting tool in asp.net websites. They are very powerful, but sometimes hard to use. They have so many options and properties, it’s sometimes hard to find the right one.
Last week the devexpress blog showed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ericdotnet.wordpress.com&blog=953062&post=106&subd=ericdotnet&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>At work we work with Devexpress components for our windows applications. And I have used some like the pivotgrid and the reporting tool in asp.net websites. They are very powerful, but sometimes hard to use. They have so many options and properties, it’s sometimes hard to find the right one.</p>
<p>Last week the <a href="http://community.devexpress.com/blogs/ctodx/archive/2009/06/19/from-the-devexpress-labs-early-preview-of-asp-net-mvc-grid.aspx">devexpress blog</a> showed a screenshot of their upcoming asp.net mvc grid. It looks suspisciously like jQuery’s <a href="http://tablesorter.com/docs/">tablesorter</a> plugin. What wasn’t revealed though, is how this grid hooks up with the controller, what actions you have to implement etc. So I wonder how they’re going to implement the model ‘hookup’ so to speak.</p>
<p>I am not really anxious to get these kind of tools and components for asp.net mvc, as you can already do that stuff using jquery and your ORM of choice, but you never know, maybe they will come up with something nice, that isn’t overcomplicated and bloated <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
<p><strong>Update : </strong>Oops that last part suggest that the devexpress components are bloated, but I didn&#8217;t intend it that way. They can be a bit complicated to use though, but their support is always willing to send you a bit of example code if you&#8217;re stuck.</p>
<p>Anyway I just hope they come up with something that&#8217;s &#8216;in the spirit&#8217; of MVC, if you know what i mean !</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ericdotnet.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ericdotnet.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ericdotnet.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ericdotnet.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ericdotnet.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ericdotnet.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ericdotnet.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ericdotnet.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ericdotnet.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ericdotnet.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ericdotnet.wordpress.com&blog=953062&post=106&subd=ericdotnet&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ericdotnet.wordpress.com/2009/06/22/devexpress-asp-net-mvc-grid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5a0f3d36a591e41b7dadd07c5f182a51?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">ericdotnet</media:title>
		</media:content>
	</item>
		<item>
		<title>Editing in jqGrid with asp.net mvc</title>
		<link>http://ericdotnet.wordpress.com/2009/05/02/editing-in-jqgrid-with-aspnet-mvc/</link>
		<comments>http://ericdotnet.wordpress.com/2009/05/02/editing-in-jqgrid-with-aspnet-mvc/#comments</comments>
		<pubDate>Sat, 02 May 2009 15:12:00 +0000</pubDate>
		<dc:creator>ericdotnet</dc:creator>
				<category><![CDATA[asp.net mvc]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[grid]]></category>

		<guid isPermaLink="false">http://ericdotnet.wordpress.com/2009/05/02/editing-in-jqgrid-with-aspnet-mvc/</guid>
		<description><![CDATA[Phil Haack already posted how to use the jQuery grid ‘jqgrid’ on his blog haacked.com. What wasn’t covered in that tutorial was editing, so I thought it would be nice to add that here.
To be honest it gave me a bit of a headache, as I had created a sample table that had the ID [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ericdotnet.wordpress.com&blog=953062&post=104&subd=ericdotnet&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Phil Haack already posted how to use the jQuery grid ‘<a href="http://www.trirand.com/blog/">jqgrid</a>’ on <a href="http://haacked.com/archive/2009/04/14/using-jquery-grid-with-asp.net-mvc.aspx">his blog haacked.com</a>. What wasn’t covered in that tutorial was editing, so I thought it would be nice to add that here.</p>
<p>To be honest it gave me a bit of a headache, as I had created a sample table that had the ID column as primary key/autonumber field and jqgrid posts back an ID as well. Mind you, that is <strong>the ROWID</strong> and not the ID of your record. In a demo app. this can easily go unnoticed as those two are the same when you just add a few records.</p>
<p>After reading up in the docs, and trying to add an extra parameter to the save call (which accidently broke the whole grid), I simply added a hidden column that contains the primary key.</p>
<p>The table I used for this demo was a simple Employees table with an id, first and lastname.</p>
<p>Here’s what the javascript looks like:</p>
<div id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:eff178d7-1a16-47be-80ec-49a9d1e1dab8" class="wlWriterEditableSmartContent" style="display:inline;float:none;margin:0;padding:0;">
<pre style="background-color:#FFFFFF;white-space:pre-wrap;overflow:auto;"><span style="color:#000000;">   jQuery(</span><span style="color:#800000;">"</span><span style="color:#800000;">#list</span><span style="color:#800000;">"</span><span style="color:#000000;">).jqGrid({
      url: </span><span style="color:#800000;">'</span><span style="color:#800000;">/GridDemo/GetGridData</span><span style="color:#800000;">'</span><span style="color:#000000;">,
      datatype: </span><span style="color:#800000;">'</span><span style="color:#800000;">json</span><span style="color:#800000;">'</span><span style="color:#000000;">,
      mtype: </span><span style="color:#800000;">'</span><span style="color:#800000;">GET</span><span style="color:#800000;">'</span><span style="color:#000000;">,
      colNames: [</span><span style="color:#800000;">'</span><span style="color:#800000;">IdNr</span><span style="color:#800000;">'</span><span style="color:#000000;">,</span><span style="color:#800000;">'</span><span style="color:#800000;">Id</span><span style="color:#800000;">'</span><span style="color:#000000;">, </span><span style="color:#800000;">'</span><span style="color:#800000;">FirstName</span><span style="color:#800000;">'</span><span style="color:#000000;">, </span><span style="color:#800000;">'</span><span style="color:#800000;">LastName</span><span style="color:#800000;">'</span><span style="color:#000000;">],
      colModel: [
          { name: </span><span style="color:#800000;">'</span><span style="color:#800000;">IdNr</span><span style="color:#800000;">'</span><span style="color:#000000;">, index: </span><span style="color:#800000;">'</span><span style="color:#800000;">IdNr</span><span style="color:#800000;">'</span><span style="color:#000000;">, width: </span><span style="color:#800080;">40</span><span style="color:#000000;">, align: </span><span style="color:#800000;">'</span><span style="color:#800000;">left</span><span style="color:#800000;">'</span><span style="color:#000000;">,
              editable: </span><span style="color:#0000FF;">true</span><span style="color:#000000;">, editrules: { edithidden: </span><span style="color:#0000FF;">true</span><span style="color:#000000;"> }, hidden: </span><span style="color:#0000FF;">true</span><span style="color:#000000;"> },
          { name: </span><span style="color:#800000;">'</span><span style="color:#800000;">Id</span><span style="color:#800000;">'</span><span style="color:#000000;">, index: </span><span style="color:#800000;">'</span><span style="color:#800000;">Id</span><span style="color:#800000;">'</span><span style="color:#000000;">, width: </span><span style="color:#800080;">40</span><span style="color:#000000;">, align: </span><span style="color:#800000;">'</span><span style="color:#800000;">left</span><span style="color:#800000;">'</span><span style="color:#000000;">,
              editable: </span><span style="color:#0000FF;">false</span><span style="color:#000000;"> },
          { name: </span><span style="color:#800000;">'</span><span style="color:#800000;">FirstName</span><span style="color:#800000;">'</span><span style="color:#000000;">, index: </span><span style="color:#800000;">'</span><span style="color:#800000;">FirstName</span><span style="color:#800000;">'</span><span style="color:#000000;">, width: </span><span style="color:#800080;">200</span><span style="color:#000000;">, align: </span><span style="color:#800000;">'</span><span style="color:#800000;">left</span><span style="color:#800000;">'</span><span style="color:#000000;">, editable: </span><span style="color:#0000FF;">true</span><span style="color:#000000;">, edittype: </span><span style="color:#800000;">'</span><span style="color:#800000;">text</span><span style="color:#800000;">'</span><span style="color:#000000;">, editoptions: { size: </span><span style="color:#800080;">20</span><span style="color:#000000;">, maxlength: </span><span style="color:#800080;">30</span><span style="color:#000000;">} },
          { name: </span><span style="color:#800000;">'</span><span style="color:#800000;">LastName</span><span style="color:#800000;">'</span><span style="color:#000000;">, index: </span><span style="color:#800000;">'</span><span style="color:#800000;">LastName</span><span style="color:#800000;">'</span><span style="color:#000000;">, width: </span><span style="color:#800080;">300</span><span style="color:#000000;">, align: </span><span style="color:#800000;">'</span><span style="color:#800000;">left</span><span style="color:#800000;">'</span><span style="color:#000000;">, editable: </span><span style="color:#0000FF;">true</span><span style="color:#000000;">, edittype: </span><span style="color:#800000;">'</span><span style="color:#800000;">text</span><span style="color:#800000;">'</span><span style="color:#000000;">, editoptions: { size: </span><span style="color:#800080;">20</span><span style="color:#000000;">, maxlength: </span><span style="color:#800080;">30</span><span style="color:#000000;">}}],
      onSelectRow: function(id) {
        </span><span style="color:#0000FF;">if</span><span style="color:#000000;"> (id </span><span style="color:#000000;">&amp;&amp;</span><span style="color:#000000;"> id </span><span style="color:#000000;">!==</span><span style="color:#000000;"> lastsel2) {
          jQuery(</span><span style="color:#800000;">'</span><span style="color:#800000;">#list</span><span style="color:#800000;">'</span><span style="color:#000000;">).restoreRow(lastsel2);
          jQuery(</span><span style="color:#800000;">'</span><span style="color:#800000;">#list</span><span style="color:#800000;">'</span><span style="color:#000000;">).editRow(id, </span><span style="color:#0000FF;">true</span><span style="color:#000000;">);
          lastsel2 </span><span style="color:#000000;">=</span><span style="color:#000000;"> id;
        }
      },
      editurl: </span><span style="color:#800000;">"</span><span style="color:#800000;">/GridDemo/GridSave</span><span style="color:#800000;">"</span><span style="color:#000000;">,
      pager: jQuery(</span><span style="color:#800000;">'</span><span style="color:#800000;">#pager</span><span style="color:#800000;">'</span><span style="color:#000000;">),
      rowNum: </span><span style="color:#800080;">10</span><span style="color:#000000;">,
      rowList: [</span><span style="color:#800080;">5</span><span style="color:#000000;">, </span><span style="color:#800080;">10</span><span style="color:#000000;">, </span><span style="color:#800080;">20</span><span style="color:#000000;">, </span><span style="color:#800080;">50</span><span style="color:#000000;">],
      sortname: </span><span style="color:#800000;">'</span><span style="color:#800000;">Id</span><span style="color:#800000;">'</span><span style="color:#000000;">,
      sortorder: </span><span style="color:#800000;">"</span><span style="color:#800000;">desc</span><span style="color:#800000;">"</span><span style="color:#000000;">,
      viewrecords: </span><span style="color:#0000FF;">true</span><span style="color:#000000;">,
      imgpath: </span><span style="color:#800000;">'</span><span style="color:#800000;">/content/themes/steel/images</span><span style="color:#800000;">'</span><span style="color:#000000;">,
      caption: </span><span style="color:#800000;">'</span><span style="color:#800000;">Employees</span><span style="color:#800000;">'</span><span style="color:#000000;">
    });
  });     </span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>The IdNr is the hidden field, with the edithidden: true editrules you make sure it gets posted once a row has been edited. I choose for inline editing, there are other forms of editing in <a href="http://www.secondpersonplural.ca/jqgriddocs/index.htm">the jqgriddocs</a>.</p>
<p>As you can see the editurl is where the data that has been edited will be posted to. That controller action looks like this (using linq2sql, but ofcourse any type of model will do) :</p>
<div id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:15ef302b-ab56-4da5-9ca8-5a7ae9cb9619" class="wlWriterEditableSmartContent" style="display:inline;float:none;margin:0;padding:0;">
<pre style="background-color:#FFFFFF;white-space:pre-wrap;overflow:auto;"><span style="color:#0000FF;">public</span><span style="color:#000000;"> ActionResult GridSave(</span><span style="color:#0000FF;">int</span><span style="color:#000000;"> id,</span><span style="color:#0000FF;">int</span><span style="color:#000000;"> idnr, </span><span style="color:#0000FF;">string</span><span style="color:#000000;"> firstName, </span><span style="color:#0000FF;">string</span><span style="color:#000000;"> lastName)
{
  jQueryGridModelDataContext db </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000FF;">new</span><span style="color:#000000;"> jQueryGridModelDataContext();

  Employee e </span><span style="color:#000000;">=</span><span style="color:#000000;"> db.Employees.SingleOrDefault(p </span><span style="color:#000000;">=&gt;</span><span style="color:#000000;"> p.ID </span><span style="color:#000000;">==</span><span style="color:#000000;"> idnr);
  </span><span style="color:#0000FF;">if</span><span style="color:#000000;"> (</span><span style="color:#000000;">!</span><span style="color:#000000;">(e </span><span style="color:#000000;">==</span><span style="color:#000000;"> </span><span style="color:#0000FF;">null</span><span style="color:#000000;">))
  {
      e.FirstName </span><span style="color:#000000;">=</span><span style="color:#000000;"> firstName;
      e.LastName </span><span style="color:#000000;">=</span><span style="color:#000000;"> lastName;
      db.SubmitChanges();
      </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> Content(</span><span style="color:#800000;">"</span><span style="color:#800000;">true</span><span style="color:#800000;">"</span><span style="color:#000000;">);
  }
  </span><span style="color:#0000FF;">else</span><span style="color:#000000;">
  {
      </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> Content(</span><span style="color:#800000;">"</span><span style="color:#800000;">false</span><span style="color:#800000;">"</span><span style="color:#000000;">);
  }
}</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>And that’s it, your grid now has editing functionality ! Ofcourse some validation is required in the GridSave function. The javascript could use the callback function after saving and check for the true or false that gets returned from the GridSave action.</p>
<p>Let me know in the comments if you have any questions or if I made some sort of horrible mistake <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .<br />
<br />
<a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fericdotnet.wordpress.com%2f2009%2f05%2f02%2fediting-in-jqgrid-with-aspnet-mvc%2f"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fericdotnet.wordpress.com%2f2009%2f05%2f02%2fediting-in-jqgrid-with-aspnet-mvc%2f" border="0" alt="kick it on DotNetKicks.com" /></a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ericdotnet.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ericdotnet.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ericdotnet.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ericdotnet.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ericdotnet.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ericdotnet.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ericdotnet.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ericdotnet.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ericdotnet.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ericdotnet.wordpress.com/104/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ericdotnet.wordpress.com&blog=953062&post=104&subd=ericdotnet&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ericdotnet.wordpress.com/2009/05/02/editing-in-jqgrid-with-aspnet-mvc/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5a0f3d36a591e41b7dadd07c5f182a51?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">ericdotnet</media:title>
		</media:content>

		<media:content url="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fericdotnet.wordpress.com%2f2009%2f05%2f02%2fediting-in-jqgrid-with-aspnet-mvc%2f" medium="image">
			<media:title type="html">kick it on DotNetKicks.com</media:title>
		</media:content>
	</item>
		<item>
		<title>jQuery Search box and Asp.net MVC</title>
		<link>http://ericdotnet.wordpress.com/2009/04/09/jquery-search-box-and-aspnet-mvc/</link>
		<comments>http://ericdotnet.wordpress.com/2009/04/09/jquery-search-box-and-aspnet-mvc/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 12:49:22 +0000</pubDate>
		<dc:creator>ericdotnet</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[asp.net mvc]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://ericdotnet.wordpress.com/2009/04/09/jquery-search-box-and-aspnet-mvc/</guid>
		<description><![CDATA[This is a simple run through on how to create a fancy search box, that has suggestions underneath the input box, and that also can do autocomplete. For this example I used the Chinook database from codeplex and the Artists table and the autocomplete jquery plug-in that you can find at pengoworks.com.
There are plenty of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ericdotnet.wordpress.com&blog=953062&post=98&subd=ericdotnet&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is a simple run through on how to create a fancy search box, that has suggestions underneath the input box, and that also can do autocomplete. For this example I used the <a href="http://www.codeplex.com/ChinookDatabase">Chinook database from codeplex</a> and the Artists table and the autocomplete jquery plug-in that you can find at <a href="http://www.pengoworks.com/workshop/jquery/autocomplete.htm">pengoworks.com</a>.</p>
<p>There are plenty of jQuery plug-ins that do the same thing, I picked this one as it’s very easy to use. As <a href="http://www.pengoworks.com/workshop/jquery/autocomplete_docs.txt">the docs</a> show, the only thing you need to do is hook your input text box up to autocomplete and provide the url where it gets it’s data from. The view looks like this.</p>
<div id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:4072a427-4995-4f19-adc0-59365cbad4ff" class="wlWriterEditableSmartContent" style="display:inline;float:none;margin:0;padding:0;">
<pre style="background-color:#FFFFFF;white-space:pre-wrap;overflow:auto;"><span style="color:#0000FF;">&lt;</span><span style="color:#800000;">asp:Content </span><span style="color:#FF0000;">ID</span><span style="color:#0000FF;">="headerContent"</span><span style="color:#FF0000;"> ContentPlaceHolderID </span><span style="color:#0000FF;">="headerPlaceHolder"</span><span style="color:#FF0000;"> runat </span><span style="color:#0000FF;">="server"</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">
  </span><span style="color:#0000FF;">&lt;</span><span style="color:#800000;">script </span><span style="color:#FF0000;">type</span><span style="color:#0000FF;">="text/javascript"</span><span style="color:#FF0000;"> src</span><span style="color:#0000FF;">="../../Scripts/jquery.autocomplete.js"</span><span style="color:#0000FF;">&gt;&lt;/</span><span style="color:#800000;">script</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">
  </span><span style="color:#0000FF;">&lt;</span><span style="color:#800000;">link </span><span style="color:#FF0000;">href</span><span style="color:#0000FF;">="../../Content/jquery.autocomplete.css"</span><span style="color:#FF0000;"> rel</span><span style="color:#0000FF;">="stylesheet"</span><span style="color:#FF0000;"> type</span><span style="color:#0000FF;">="text/css"</span><span style="color:#FF0000;"> </span><span style="color:#0000FF;">/&gt;</span><span style="color:#000000;">

  </span><span style="color:#0000FF;">&lt;</span><span style="color:#800000;">script </span><span style="color:#FF0000;">type</span><span style="color:#0000FF;">="text/javascript"</span><span style="color:#0000FF;">&gt;</span><span style="background-color:#F5F5F5;color:#000000;">

    $(document).ready(</span><span style="background-color:#F5F5F5;color:#0000FF;">function</span><span style="background-color:#F5F5F5;color:#000000;">() {
      $(</span><span style="background-color:#F5F5F5;color:#000000;">"</span><span style="background-color:#F5F5F5;color:#000000;">#searchTerm</span><span style="background-color:#F5F5F5;color:#000000;">"</span><span style="background-color:#F5F5F5;color:#000000;">).autocomplete(</span><span style="background-color:#F5F5F5;color:#000000;">"</span><span style="background-color:#F5F5F5;color:#000000;">/Artists/getAjaxResult/</span><span style="background-color:#F5F5F5;color:#000000;">"</span><span style="background-color:#F5F5F5;color:#000000;">);
    });

  </span><span style="color:#0000FF;">&lt;/</span><span style="color:#800000;">script</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">
</span><span style="color:#0000FF;">&lt;/</span><span style="color:#800000;">asp:Content</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">

</span><span style="color:#0000FF;">&lt;</span><span style="color:#800000;">asp:Content </span><span style="color:#FF0000;">ID</span><span style="color:#0000FF;">="Content2"</span><span style="color:#FF0000;"> ContentPlaceHolderID</span><span style="color:#0000FF;">="MainContent"</span><span style="color:#FF0000;"> runat</span><span style="color:#0000FF;">="server"</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">

    </span><span style="color:#0000FF;">&lt;</span><span style="color:#800000;">h2</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">Look for an artist</span><span style="color:#0000FF;">&lt;/</span><span style="color:#800000;">h2</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">

    </span><span style="color:#0000FF;">&lt;</span><span style="color:#800000;">form </span><span style="color:#FF0000;">action</span><span style="color:#0000FF;">="/Artists/Search"</span><span style="color:#FF0000;"> method</span><span style="color:#0000FF;">="post"</span><span style="color:#FF0000;"> id</span><span style="color:#0000FF;">="searchForm"</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">
      </span><span style="color:#0000FF;">&lt;</span><span style="color:#800000;">input </span><span style="color:#FF0000;">type</span><span style="color:#0000FF;">="text"</span><span style="color:#FF0000;"> name</span><span style="color:#0000FF;">="searchTerm"</span><span style="color:#FF0000;"> id</span><span style="color:#0000FF;">="searchTerm"</span><span style="color:#FF0000;"> value</span><span style="color:#0000FF;">=""</span><span style="color:#FF0000;"> size</span><span style="color:#0000FF;">="10"</span><span style="color:#FF0000;"> maxlength </span><span style="color:#0000FF;">="30"</span><span style="color:#FF0000;"> </span><span style="color:#0000FF;">/&gt;</span><span style="color:#000000;">
      </span><span style="color:#0000FF;">&lt;</span><span style="color:#800000;">input </span><span style="color:#FF0000;">type </span><span style="color:#0000FF;">="submit"</span><span style="color:#FF0000;"> value</span><span style="color:#0000FF;">="Search"</span><span style="color:#FF0000;"> </span><span style="color:#0000FF;">/&gt;</span><span style="color:#000000;">
    </span><span style="color:#0000FF;">&lt;/</span><span style="color:#800000;">form</span><span style="color:#0000FF;">&gt;</span><span style="color:#000000;">
    </span><span style="color:#0000FF;">&lt;</span><span style="color:#800000;">br </span><span style="color:#0000FF;">/&gt;</span><span style="color:#000000;">

</span><span style="color:#0000FF;">&lt;/</span><span style="color:#800000;">asp:Content</span><span style="color:#0000FF;">&gt;</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>As you can see I usually have a container in the header of the master page where javascript and custom css files go. Note that you should use the<em> Url.Content method</em> so you get the proper urls when you deploy this on a ‘real server’.</p>
<p>Now for the backend, we need an action that returns a string of results to the autocomplete call.</p>
<div id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:1f64ab81-53e7-4743-8f62-8ab0c3184a7e" class="wlWriterEditableSmartContent" style="display:inline;float:none;margin:0;padding:0;">
<pre style="background-color:#FFFFFF;white-space:pre-wrap;overflow:auto;"><span style="color:#000000;">        </span><span style="color:#0000FF;">public</span><span style="color:#000000;"> ActionResult getAjaxResult(</span><span style="color:#0000FF;">string</span><span style="color:#000000;"> q)
        {

            </span><span style="color:#0000FF;">string</span><span style="color:#000000;"> searchResult </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000FF;">string</span><span style="color:#000000;">.Empty;

            var artists </span><span style="color:#000000;">=</span><span style="color:#000000;"> (from a </span><span style="color:#0000FF;">in</span><span style="color:#000000;"> _db.Artists
                           </span><span style="color:#0000FF;">where</span><span style="color:#000000;"> a.Name.Contains(q)
                           orderby a.Name
                           select a).Take(</span><span style="color:#800080;">10</span><span style="color:#000000;">);

            </span><span style="color:#0000FF;">foreach</span><span style="color:#000000;"> (Artist a </span><span style="color:#0000FF;">in</span><span style="color:#000000;"> artists) {
                searchResult </span><span style="color:#000000;">+=</span><span style="color:#000000;"> </span><span style="color:#0000FF;">string</span><span style="color:#000000;">.Format(</span><span style="color:#800000;">"</span><span style="color:#800000;">{0}|\r\n</span><span style="color:#800000;">"</span><span style="color:#000000;">, a.Name);
            }

            </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> Content(searchResult);
        }</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>By using linq to sql I get the top 10 results from the database from the Artists table and return that as a string to the autocomplete call. The user’s input string is a string called q that is put into the action as a url parameter like this: <strong>artists/getAjaxResult/?q=symphony. </strong>In order to make that work, you need to add a route to the routes table.</p>
<div id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:41019e7a-ff43-4209-9d31-7e70ae7fed70" class="wlWriterEditableSmartContent" style="display:inline;float:none;margin:0;padding:0;">
<pre style="background-color:#FFFFFF;white-space:pre-wrap;overflow:auto;"><span style="color:#000000;">
            routes.MapRoute(
                </span><span style="color:#800000;">"</span><span style="color:#800000;">ArtistSearch</span><span style="color:#800000;">"</span><span style="color:#000000;">,
                </span><span style="color:#800000;">"</span><span style="color:#800000;">Artists/Search/{searchTerm}</span><span style="color:#800000;">"</span><span style="color:#000000;">,
                </span><span style="color:#0000FF;">new</span><span style="color:#000000;"> { controller </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">"</span><span style="color:#800000;">Artists</span><span style="color:#800000;">"</span><span style="color:#000000;">, action </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">"</span><span style="color:#800000;">Search</span><span style="color:#800000;">"</span><span style="color:#000000;">,
                            searchTerm </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">""</span><span style="color:#000000;"> }
            );
            routes.MapRoute(
                </span><span style="color:#800000;">"</span><span style="color:#800000;">ArtistAjaxSearch</span><span style="color:#800000;">"</span><span style="color:#000000;">,
                </span><span style="color:#800000;">"</span><span style="color:#800000;">Artists/getAjaxResult/</span><span style="color:#800000;">"</span><span style="color:#000000;">,
                </span><span style="color:#0000FF;">new</span><span style="color:#000000;"> { controller </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">"</span><span style="color:#800000;">Artists</span><span style="color:#800000;">"</span><span style="color:#000000;">, action </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">"</span><span style="color:#800000;">getAjaxResult</span><span style="color:#800000;">"</span><span style="color:#000000;"> }
            );</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>The first route is used once the user has pressed the submit button, the ArtistAjaxSearch is used for the autocomplete script.</p>
<p>So what happens when the user presses the submit button, whether or not he picked an item from the autocomplete results ?</p>
<div id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:c03f2417-545f-4420-929d-634ceeebb909" class="wlWriterEditableSmartContent" style="display:inline;float:none;margin:0;padding:0;">
<pre style="background-color:#FFFFFF;white-space:pre-wrap;overflow:auto;"><span style="color:#000000;">        [AcceptVerbs(HttpVerbs.Post)]
        </span><span style="color:#0000FF;">public</span><span style="color:#000000;"> ActionResult Search(</span><span style="color:#0000FF;">string</span><span style="color:#000000;"> searchTerm)
        {
            </span><span style="color:#0000FF;">if</span><span style="color:#000000;"> (searchTerm </span><span style="color:#000000;">==</span><span style="color:#000000;"> </span><span style="color:#0000FF;">string</span><span style="color:#000000;">.Empty)
            {
                </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> View();
            }
            </span><span style="color:#0000FF;">else</span><span style="color:#000000;">
            {
                </span><span style="color:#008000;">//</span><span style="color:#008000;"> if the search contains only one result return details
                </span><span style="color:#008000;">//</span><span style="color:#008000;"> otherwise a list</span><span style="color:#008000;">
</span><span style="color:#000000;">                var artists </span><span style="color:#000000;">=</span><span style="color:#000000;"> from a </span><span style="color:#0000FF;">in</span><span style="color:#000000;"> _db.Artists
                              </span><span style="color:#0000FF;">where</span><span style="color:#000000;"> a.Name.Contains(searchTerm)
                              orderby a.Name
                              select a;

                </span><span style="color:#0000FF;">if</span><span style="color:#000000;"> (artists.Count() </span><span style="color:#000000;">==</span><span style="color:#000000;"> </span><span style="color:#800080;">0</span><span style="color:#000000;">) {
                    </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> View(</span><span style="color:#800000;">"</span><span style="color:#800000;">notfound</span><span style="color:#800000;">"</span><span style="color:#000000;">);
                }

                </span><span style="color:#0000FF;">if</span><span style="color:#000000;"> (artists.Count() </span><span style="color:#000000;">&gt;</span><span style="color:#000000;"> </span><span style="color:#800080;">1</span><span style="color:#000000;">)
                {
                    </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> View(</span><span style="color:#800000;">"</span><span style="color:#800000;">List</span><span style="color:#800000;">"</span><span style="color:#000000;">, artists);
                }
                </span><span style="color:#0000FF;">else</span><span style="color:#000000;">
                {
                    </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> RedirectToAction(</span><span style="color:#800000;">"</span><span style="color:#800000;">Details</span><span style="color:#800000;">"</span><span style="color:#000000;">,
                        </span><span style="color:#0000FF;">new</span><span style="color:#000000;"> { id </span><span style="color:#000000;">=</span><span style="color:#000000;"> artists.First().ArtistId });
                }
            }
        }</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>As you can see, when a single result is found the details view is shown to the user, by using a redirect to the details method. If there is more than one result, the list of artists is shown. When nothing is found, a simple message is shown. You can of course move the search term to that view as well, to show the user what input he did etc., but that is straightforward stuff.</p>
<p>Another way to do this, would be to insert the artist table as an array and let the autocomplete script use those values for it’s magic, all on the client side. This would be doable as long as that table wouldn’t get too long. If there are 1000s of records, this wouldn’t be a very good solution <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
<p>Hope this helps someone out there <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> , feel free to add any comments or questions !</p>
<p><a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fericdotnet.wordpress.com%2f2009%2f04%2f09%2fjquery-search-box-and-aspnet-mvc%2f"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fericdotnet.wordpress.com%2f2009%2f04%2f09%2fjquery-search-box-and-aspnet-mvc%2f" border="0" alt="kick it on DotNetKicks.com" /></a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ericdotnet.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ericdotnet.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ericdotnet.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ericdotnet.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ericdotnet.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ericdotnet.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ericdotnet.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ericdotnet.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ericdotnet.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ericdotnet.wordpress.com/98/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ericdotnet.wordpress.com&blog=953062&post=98&subd=ericdotnet&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ericdotnet.wordpress.com/2009/04/09/jquery-search-box-and-aspnet-mvc/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5a0f3d36a591e41b7dadd07c5f182a51?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">ericdotnet</media:title>
		</media:content>

		<media:content url="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fericdotnet.wordpress.com%2f2009%2f04%2f09%2fjquery-search-box-and-aspnet-mvc%2f" medium="image">
			<media:title type="html">kick it on DotNetKicks.com</media:title>
		</media:content>
	</item>
		<item>
		<title>jQuery-Ui Tabs and Asp.net MVC</title>
		<link>http://ericdotnet.wordpress.com/2009/03/17/jquery-ui-tabs-and-aspnet-mvc/</link>
		<comments>http://ericdotnet.wordpress.com/2009/03/17/jquery-ui-tabs-and-aspnet-mvc/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 20:12:24 +0000</pubDate>
		<dc:creator>ericdotnet</dc:creator>
				<category><![CDATA[asp.net mvc]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquery-ui]]></category>

		<guid isPermaLink="false">http://ericdotnet.wordpress.com/?p=80</guid>
		<description><![CDATA[Clay made a comment on my previous post and asked how I would use asp.net mvc with jQuery-UI&#8217;s tabs. I have slapped together an example project that shows how you could implement the tabs in an asp.net mvc web site. I created an ajax and a regular tab example.
Basically I use a partial view for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ericdotnet.wordpress.com&blog=953062&post=80&subd=ericdotnet&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Clay made a comment on my previous post and asked how I would use asp.net mvc with <a href="http://jqueryui.com/demos/tabs/">jQuery-UI&#8217;s tabs</a>. I have slapped together an example project that shows how you could implement the tabs in an asp.net mvc web site. I created an ajax and a regular tab example.</p>
<div id="attachment_92" class="wp-caption aligncenter" style="width: 310px"><a href="http://ericdotnet.files.wordpress.com/2009/03/tabexample1.png"><img class="size-medium wp-image-92" title="Tab Example" src="http://ericdotnet.files.wordpress.com/2009/03/tabexample1.png?w=300&#038;h=204" alt="Tab Example jQueryUi" width="300" height="204" /></a><p class="wp-caption-text">Tab Example jQueryUi</p></div>
<p>Basically I use a partial view for each tab. This partial view is then also used for the ajax response.</p>
<pre class="brush: xml;">
&lt;div id=&quot;tabs&quot;&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;#tabs-1&quot;&gt;Text 1&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#tabs-2&quot;&gt;Text 2&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#tabs-3&quot;&gt;Text 3&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div id=&quot;tabs-1&quot;&gt;
            &lt; % Html.RenderPartial(&quot;_tab1&quot;, Model);  %&gt;&lt;/div&gt;
&lt;div id=&quot;tabs-2&quot;&gt;
	        &lt; % Html.RenderPartial(&quot;_tab2&quot;, Model);  %&gt;&lt;/div&gt;
&lt;div id=&quot;tabs-3&quot;&gt;
	        &lt; % Html.RenderPartial(&quot;_tab3&quot;, Model);  %&gt;&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>There is no database access in the example project, I sort of simulated a database by using a service model that provides the viewmodel that holds the texts that are displayed in the three tabs.</p>
<p>Regarding the ajax controller method, it would of course be better to not get the entire viewmodel in a real world situation and then pass that on to the view, but since this is a brief demo I thought I could get away with this in this example <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
<pre class="brush: csharp;">

        public ActionResult getAjaxTab(int id)
        {
            string viewName = string.Empty;

            TabExample.Services.tabTextService serv = new TabExample.Services.tabTextService();
            tabViewModel myModel = serv.getTabViewModel();

            switch (id)
            {
                case 1:
                    viewName = &quot;_tab1&quot;;
                    break;
                case 2:
                    viewName = &quot;_tab2&quot;;
                    break;
                case 3:
                    viewName = &quot;_tab3&quot;;
                    break;
                default:
                    viewName = &quot;_error&quot;;
                    break;
            }

            System.Threading.Thread.Sleep(1000);   

            return PartialView(viewName, myModel);
        }
</pre>
<p>I am using this js function to update the tabs.</p>
<pre class="brush: jscript;">

        function getContentTab(index) {
            var url='&lt; %= Url.Content(&quot;~/Home/getAjaxTab&quot;) %&gt;/' + index;
            var targetDiv = &quot;#tabs-&quot; + index;
            var ajaxLoading = &quot;&lt;img id='ajax-loader' src='&lt;%= Url.Content(&quot;~/Content&quot;) %/&gt;/ajax-loader.gif' align='left' height='28' width='28'&gt;&quot;;

            $(targetDiv).html(&quot;
&quot; + ajaxLoading + &quot; Loading...
&quot;); 

            $.get(url,null, function(result) {
                $(targetDiv).html(result);
            });
        }
</pre>
<p>There is a <a href="http://jqueryui.com/demos/tabs/#event-select">select event</a> on the tabs that you can hook into as well, I just find it easier to just use the onclick event of the tab div&#8217;s.</p>
<p>Hope this is some help to anybody out there, it was fun to create this small project. If anyone has any suggestions, or questions let me know in the comments !</p>
<p><a href="http://www.sobaseki.com/downloads/TabExample.zip">Download TabExample Project Link</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ericdotnet.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ericdotnet.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ericdotnet.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ericdotnet.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ericdotnet.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ericdotnet.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ericdotnet.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ericdotnet.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ericdotnet.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ericdotnet.wordpress.com/80/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ericdotnet.wordpress.com&blog=953062&post=80&subd=ericdotnet&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ericdotnet.wordpress.com/2009/03/17/jquery-ui-tabs-and-aspnet-mvc/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5a0f3d36a591e41b7dadd07c5f182a51?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">ericdotnet</media:title>
		</media:content>

		<media:content url="http://ericdotnet.files.wordpress.com/2009/03/tabexample1.png?w=300" medium="image">
			<media:title type="html">Tab Example</media:title>
		</media:content>
	</item>
		<item>
		<title>jQuery-ui 1.7 and Asp.net MVC</title>
		<link>http://ericdotnet.wordpress.com/2009/03/06/jquery-ui-17-and-aspnet-mvc/</link>
		<comments>http://ericdotnet.wordpress.com/2009/03/06/jquery-ui-17-and-aspnet-mvc/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 14:09:18 +0000</pubDate>
		<dc:creator>ericdotnet</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquery-ui]]></category>

		<guid isPermaLink="false">http://ericdotnet.wordpress.com/?p=69</guid>
		<description><![CDATA[The news of a new jQuery-ui 1.7 release came in through twitter ! The asp.net mvc application I am working on at the moment uses various jquery-ui things, like the accordeon and the datepicker, and some of the icons, but it was a bit messy to actually get it to work. Some of the images [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ericdotnet.wordpress.com&blog=953062&post=69&subd=ericdotnet&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The news of a <a href="http://blog.jqueryui.com/">new jQuery-ui 1.7</a> release came in <a href="http://twitter.com/jqueryui">through twitter</a> ! The asp.net mvc application I am working on at the moment uses various jquery-ui things, like the accordeon and the datepicker, and some of the icons, but it was a bit messy to actually get it to work. Some of the images were named wrong and the paths didn&#8217;t quite work.</p>
<p>The Content and Script folder had become a big mess as well. Luckily with 1.7 that has all passed, I removed the previous version and all images, and inserted the 1.7 smoothness theme. Changed the css and jquery ui calls in the master view and it worked out of the box ! No need to hack around anymore, no image renaming etc&#8230; Gratz to the jQuery-ui team for delivering such a nice product.</p>
<pre class="brush: xml;">
	&lt;link href=&quot;../../Content/Site.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
	&lt;link href=&quot;../../Content/Theme_Red/jquery-ui.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
	&lt;link href=&quot;../../Content/jquery-ui.custom.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
</pre>
<p>If you want to make any changes to the ui, for example I added some padding to the ui-state-error and ui-state-highlight classes, make sure to put them in a seperate file and load them after the included jquery-ui.css file. That way if you change themes or if there is an update, your changes will remain.</p>
<p style="text-align:center;">
<div id="attachment_71" class="wp-caption aligncenter" style="width: 558px"><a href="http://ericdotnet.files.wordpress.com/2009/03/w-winkel.png"></a><a href="http://ericdotnet.files.wordpress.com/2009/03/w-winkel1.png"><img class="size-full wp-image-74" title="w-winkel1" src="http://ericdotnet.files.wordpress.com/2009/03/w-winkel1.png?w=548&#038;h=401" alt="w-winkel1" width="548" height="401" /></a><p class="wp-caption-text">jQuery UI in action</p></div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ericdotnet.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ericdotnet.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ericdotnet.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ericdotnet.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ericdotnet.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ericdotnet.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ericdotnet.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ericdotnet.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ericdotnet.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ericdotnet.wordpress.com/69/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ericdotnet.wordpress.com&blog=953062&post=69&subd=ericdotnet&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ericdotnet.wordpress.com/2009/03/06/jquery-ui-17-and-aspnet-mvc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5a0f3d36a591e41b7dadd07c5f182a51?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">ericdotnet</media:title>
		</media:content>

		<media:content url="http://ericdotnet.files.wordpress.com/2009/03/w-winkel1.png" medium="image">
			<media:title type="html">w-winkel1</media:title>
		</media:content>
	</item>
		<item>
		<title>CSS Font-Size and Font</title>
		<link>http://ericdotnet.wordpress.com/2009/03/01/css-font-size-and-font/</link>
		<comments>http://ericdotnet.wordpress.com/2009/03/01/css-font-size-and-font/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 10:37:49 +0000</pubDate>
		<dc:creator>ericdotnet</dc:creator>
				<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://ericdotnet.wordpress.com/?p=66</guid>
		<description><![CDATA[There is an odd issue with font-size: and font: in css. I am using the cutline pro 1.4 theme on my eve-blog, and edited the comment section of that theme. IE8 and Google Chrome both showed the fonts real small where as Firefox 3 picked it up the way I intended. Turns out the font: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ericdotnet.wordpress.com&blog=953062&post=66&subd=ericdotnet&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>There is an odd issue with font-size: and font: in css. I am using the cutline pro 1.4 theme on my eve-blog, and edited the comment section of that theme. IE8 and Google Chrome both showed the fonts real small where as Firefox 3 picked it up the way I intended. Turns out the font: description was not overwritten by font-size in the css file.</p>
<p><strong>Original</strong></p>
<pre class="brush: css;">
body {
     font: 62.5% Georgia, &quot;Times New Roman&quot;, Times, serif;
}

comment {
      font-size: 1.4em;
}
</pre>
<p>Cleaned up:</p>
<pre class="brush: css;">
body {
	font-size: 62.5%;
	font-family: Georgia, &quot;Times New Roman&quot;, Times, serif;
}
</pre>
<p>And now it&#8217;s fixed <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ericdotnet.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ericdotnet.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ericdotnet.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ericdotnet.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ericdotnet.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ericdotnet.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ericdotnet.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ericdotnet.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ericdotnet.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ericdotnet.wordpress.com/66/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ericdotnet.wordpress.com&blog=953062&post=66&subd=ericdotnet&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ericdotnet.wordpress.com/2009/03/01/css-font-size-and-font/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5a0f3d36a591e41b7dadd07c5f182a51?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">ericdotnet</media:title>
		</media:content>
	</item>
		<item>
		<title>Jquery-ui helper</title>
		<link>http://ericdotnet.wordpress.com/2009/02/26/jquery-ui-helper/</link>
		<comments>http://ericdotnet.wordpress.com/2009/02/26/jquery-ui-helper/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 11:43:30 +0000</pubDate>
		<dc:creator>ericdotnet</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[asp.net mvc]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquery-ui]]></category>

		<guid isPermaLink="false">http://ericdotnet.wordpress.com/?p=60</guid>
		<description><![CDATA[Lately I have been trying to get the jquery-ui theme to work nicely with an asp.net mvc site. The hard part was to figure out how to get the paths correctly in the ui.theme.css and ui.all.css files. I ended up just adding the full path in there, only need to search and replace them once [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ericdotnet.wordpress.com&blog=953062&post=60&subd=ericdotnet&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Lately I have been trying to get the <a href="http://jqueryui.com/">jquery-ui </a>theme to work nicely with an asp.net mvc site. The hard part was to figure out how to get the paths correctly in the <em>ui.theme.css</em> and <em>ui.all.css</em> files. I ended up just adding the full path in there, only need to search and replace them once I deploy them to the web server. Not a pretty solution, but it works for now.</p>
<p>A nice feature of the jquery-ui theme is that you can use nice little icons, as you can see on the <a href="http://jqueryui.com/themeroller/#themeGallery">theme gallery page</a>. The trick is to insert a small span that looks like this :</p>
<pre class="brush: xml;">
&lt;p class=&quot;ui-state-error&quot;&gt;
     &lt;span class=&quot;ui-icon ui-icon-alert&quot; style=&quot;float:left;margin-right:2em;&quot;&gt;  &lt;/span&gt;Error message here !
&lt;/p&gt;
&lt;p class=&quot;ui-state-highlight&quot;&gt;Info box ...&lt;/p&gt;
</pre>
<p>As you might understand these span tags start to clutter up the view code quickly ! So right a little helper you can put in a static class.</p>
<pre class="brush: csharp;">
public static string InsertIcon(string iconName)
{
        return string.Format(&quot;&lt;span class=\&quot;ui-icon ui-{0}\&quot; style=\&quot;float: left; margin-right: .2em;\&quot;&gt;&lt;/span&gt;&quot;,iconName);
}
</pre>
<p>I am also using it in some controllers that return some simple html snippets for jQuery $.ajax methods :</p>
<pre class="brush: csharp;">
private string createErrorString(string errMsg)
{
      string output = &quot;&lt;p class=&quot;ui-state-error&quot;&gt;&quot;;
      output += jQueryUiHelper.InsertIcon(&quot;icon-alert&quot;);
      output += errMsg;
      output += &quot;&lt;/p&gt;&quot;;
      return output;
}
</pre>
<p>You can use that in a controller when an error has occured:</p>
<pre class="brush: csharp;">
return Content(createErrorString (&quot;User &quot; + userName + &quot; does not exist !&quot;));
</pre>
<p>As you can see, plenty of fun things you can do using the jQuery-ui !</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ericdotnet.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ericdotnet.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ericdotnet.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ericdotnet.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ericdotnet.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ericdotnet.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ericdotnet.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ericdotnet.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ericdotnet.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ericdotnet.wordpress.com/60/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ericdotnet.wordpress.com&blog=953062&post=60&subd=ericdotnet&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ericdotnet.wordpress.com/2009/02/26/jquery-ui-helper/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5a0f3d36a591e41b7dadd07c5f182a51?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">ericdotnet</media:title>
		</media:content>
	</item>
		<item>
		<title>Using jQuery in your WordPress theme</title>
		<link>http://ericdotnet.wordpress.com/2009/02/08/using-jquery-in-your-wordpress-theme/</link>
		<comments>http://ericdotnet.wordpress.com/2009/02/08/using-jquery-in-your-wordpress-theme/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 12:48:29 +0000</pubDate>
		<dc:creator>ericdotnet</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://ericdotnet.wordpress.com/2009/02/08/using-jquery-in-your-wordpress-theme/</guid>
		<description><![CDATA[Just updated my theme on my wordpress powered greendale.tk blog. As jQuery is now part of wordpress, I figured I should get rid of the Mootools scripts I was using and rewrite them in jQuery. Nothing against mootools, but the integration is better now with jquery, and I am now more familiar with jQuery as [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ericdotnet.wordpress.com&blog=953062&post=56&subd=ericdotnet&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Just updated my theme on my wordpress powered <a href="http://www.greendale.tk">greendale.tk blog</a>. As <a href="http://jquery.com/">jQuery</a> is now part of wordpress, I figured I should get rid of the Mootools scripts I was using and rewrite them in jQuery. Nothing against mootools, but the integration is better now with jquery, and I am now more familiar with jQuery as I use it a lot in my asp.net mvc apps. Also it didn’t always play nice with other plugins.</p>
<p>Anyway, I ran into a few issues, and I thought I’d share them here in case anyone else ran into those as well. </p>
<p>How to put the javascript files in your template ? You could ofcourse hardcode them in your headers.php, but that’s not the right way to go. I used to have these references:</p>
<div class="code">&#160;&#160;&#160; <font color="#0000ff">&lt;</font><font color="#800000">script</font><font color="#ff0000"> src</font><font color="#0000ff">=&quot;&lt;?php bloginfo(&#8216;template_directory&#8217;); ?&gt;/js/mootools.js&quot;</font><font color="#ff0000"> type</font><font color="#0000ff">=&quot;text/javascript&quot;&gt;</font><font color="#000000"></font><font color="#0000ff">&lt;/</font><font color="#800000">script</font><font color="#0000ff">&gt;</font><font color="#000000">      <br />&#160;&#160;&#160; </font><font color="#0000ff">&lt;</font><font color="#800000">script</font><font color="#ff0000"> src</font><font color="#0000ff">=&quot;&lt;?php bloginfo(&#8216;template_directory&#8217;); ?&gt;/js/eric.js&quot;</font><font color="#ff0000"> type</font><font color="#0000ff">=&quot;text/javascript&quot;&gt;</font><font color="#000000"></font><font color="#0000ff">&lt;/</font><font color="#800000">script</font><font color="#0000ff">&gt;</font><font color="#000000">&#160;&#160;&#160; </font></div>
<p>&#160;</p>
<p>As long as you use Mootool and not jQuery this works fine, but if you want to include jQuery you should use this to play along nicely with other plugins or scripts that use jQuery:</p>
<div style="border-right:gray 1px solid;border-top:gray 1px solid;font-size:8pt;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;line-height:12pt;border-bottom:gray 1px solid;font-family:consolas, &#39;background-color:#f4f4f4;max-height:200px;margin:20px 0 10px;padding:4px;">
<div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;padding:0;">
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   1:</span> &lt;?php wp_enqueue_script(<span style="color:#006080;">'jquery'</span>); ?&gt; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   2:</span> &lt;?php wp_enqueue_script(<span style="color:#006080;">'jquerycolor'</span>, <span style="color:#006080;">'/wp-content/themes/greendale/js/jquery.color.packed.js'</span>, array(<span style="color:#006080;">'jquery'</span>),<span style="color:#006080;">'1.2.6'</span>); ?&gt; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   3:</span> &lt;?php wp_enqueue_script(<span style="color:#006080;">'jquerylightbox'</span>, <span style="color:#006080;">'/wp-content/themes/greendale/js/jquery.lightbox.packed.js'</span>,array(<span style="color:#006080;">'jquery'</span>),<span style="color:#006080;">'1.2.6'</span>); ?&gt; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   4:</span> &lt;?php wp_enqueue_script(<span style="color:#006080;">'ericjs'</span>, <span style="color:#006080;">'/wp-content/themes/greendale/js/eric-jquery.js'</span>,array(<span style="color:#006080;">'jquery'</span>),<span style="color:#006080;">'1.2.6'</span>); ?&gt;</pre>
</p></div>
</div>
<p>The <a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script">wp_enqueue_script</a> command ensured everything is loaded in the right order. If you use the bloginfo command and insert the script yourself, chances are you end up loading your own script before jQuery is loaded ! Which ofcourse results in all sorts of weird errors. The eric-jquery is my own script, the lightbox stuff is for the excellent <a href="http://www.balupton.com/sandbox/jquery_lightbox/">jQuery lightbox plugin</a>. There are a few lightbox jQuery plugins, but I liked that one the best.</p>
<p>Something else you want to keep in mind. Do not use the $(“#archive_result”) jQuery selectors, but use jQuery(“#archive_result”). Something like this: </p>
<div style="border-right:gray 1px solid;border-top:gray 1px solid;font-size:8pt;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;line-height:12pt;border-bottom:gray 1px solid;font-family:consolas, &#39;background-color:#f4f4f4;max-height:200px;margin:20px 0 10px;padding:4px;">
<div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;padding:0;">
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   1:</span> jQuery(document).ready(function() {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   2:</span>     jQuery(<span style="color:#006080;">&quot;#recent_content&quot;</span>).hide();</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   3:</span>     jQuery(<span style="color:#006080;">&quot;#archive_content&quot;</span>).hide();</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   4:</span>     </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   5:</span>     jQuery(<span style="color:#006080;">&quot;#recent_h3&quot;</span>).click(function(<span style="color:#0000ff;">event</span>) {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   6:</span>         jQuery(<span style="color:#006080;">&quot;#recent_content&quot;</span>).slideToggle();        </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   7:</span>         }</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   8:</span>     )</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   9:</span>     </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  10:</span>     jQuery(<span style="color:#006080;">&quot;#archive_h3&quot;</span>).click(function(<span style="color:#0000ff;">event</span>) {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  11:</span>         jQuery(<span style="color:#006080;">&quot;#archive_content&quot;</span>).slideToggle();        </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  12:</span>         }</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  13:</span>     )    </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  14:</span> });</pre>
</p></div>
</div>
<p><a href="http://ui.jquery.com/">jQuery-ui</a> has some things I might like to add later, for now I just rewrote some of the simple sliding things on the sidebar and the archive page.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ericdotnet.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ericdotnet.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ericdotnet.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ericdotnet.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ericdotnet.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ericdotnet.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ericdotnet.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ericdotnet.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ericdotnet.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ericdotnet.wordpress.com/56/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ericdotnet.wordpress.com&blog=953062&post=56&subd=ericdotnet&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ericdotnet.wordpress.com/2009/02/08/using-jquery-in-your-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5a0f3d36a591e41b7dadd07c5f182a51?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">ericdotnet</media:title>
		</media:content>
	</item>
		<item>
		<title>Asp.net MVC Crashcourse</title>
		<link>http://ericdotnet.wordpress.com/2009/02/01/aspnet-mvc-crashcourse/</link>
		<comments>http://ericdotnet.wordpress.com/2009/02/01/aspnet-mvc-crashcourse/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 12:10:04 +0000</pubDate>
		<dc:creator>ericdotnet</dc:creator>
				<category><![CDATA[asp.net mvc]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://ericdotnet.wordpress.com/2009/02/01/aspnet-mvc-crashcourse/</guid>
		<description><![CDATA[Found a video called Asp.net MVC Show me the code through Steve Sandorson’s blog. It’s a presentation on asp.net mvc from a conference called Developer Day. The cool thing about it is that it’s very practical and actually shows you the programming experience (to stay within MS terminology) of programming an Asp.net MVC application. Some [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ericdotnet.wordpress.com&blog=953062&post=52&subd=ericdotnet&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Found a video called Asp.net MVC Show me the code through Steve Sandorson’s blog. It’s a presentation on asp.net mvc from a conference called <a href="http://www.developerday.co.uk/ddd/">Developer Day</a>. The cool thing about it is that it’s very practical and actually shows you the programming experience (to stay within MS terminology) of programming an Asp.net MVC application. Some things have changed since November, with RC1 now being out, but the general idea is still the same. </p>
<p><a title="http://blog.codeville.net/2009/01/26/video-aspnet-mvc-show-me-the-code/" href="http://blog.codeville.net/2009/01/26/video-aspnet-mvc-show-me-the-code/">http://blog.codeville.net/2009/01/26/video-aspnet-mvc-show-me-the-code/</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ericdotnet.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ericdotnet.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ericdotnet.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ericdotnet.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ericdotnet.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ericdotnet.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ericdotnet.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ericdotnet.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ericdotnet.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ericdotnet.wordpress.com/52/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ericdotnet.wordpress.com&blog=953062&post=52&subd=ericdotnet&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ericdotnet.wordpress.com/2009/02/01/aspnet-mvc-crashcourse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5a0f3d36a591e41b7dadd07c5f182a51?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">ericdotnet</media:title>
		</media:content>
	</item>
	</channel>
</rss>