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

<channel>
	<title>Fransiscus Setiawan</title>
	<atom:link href="http://fransiscuss.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://fransiscuss.com</link>
	<description>My notepad of knowledge and my passion in development</description>
	<lastBuildDate>Mon, 28 May 2012 11:22:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='fransiscuss.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Fransiscus Setiawan</title>
		<link>http://fransiscuss.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://fransiscuss.com/osd.xml" title="Fransiscus Setiawan" />
	<atom:link rel='hub' href='http://fransiscuss.com/?pushpress=hub'/>
		<item>
		<title>Protection software for my laptop</title>
		<link>http://fransiscuss.com/2012/05/28/protection-software-for-my-laptop/</link>
		<comments>http://fransiscuss.com/2012/05/28/protection-software-for-my-laptop/#comments</comments>
		<pubDate>Mon, 28 May 2012 11:22:01 +0000</pubDate>
		<dc:creator>fransiscuss</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://fransiscuss.com/2012/05/28/protection-software-for-my-laptop/</guid>
		<description><![CDATA[Just recently been suggested by my colleague to use these software for antivirus, firewall and spyware protection. It&#8217;s all free and lightweight Avast Anti Virus &#8211; http://www.avast.com/en-au/index Comodo Firewall &#8211; http://personalfirewall.comodo.com/free-download.html Malware Bytes &#8211; http://www.malwarebytes.org/products/malwarebytes_free<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&#038;blog=26182965&#038;post=407&#038;subd=fransiscuss&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just recently been suggested by my colleague to use these software for antivirus, firewall and spyware protection. It&#8217;s all free and lightweight</p>
<p>Avast Anti Virus &#8211; <a href="http://www.avast.com/en-au/index">http://www.avast.com/en-au/index</a><br />
Comodo Firewall &#8211; <a href="http://personalfirewall.comodo.com/free-download.html">http://personalfirewall.comodo.com/free-download.html</a><br />
Malware Bytes &#8211; <a href="http://www.malwarebytes.org/products/malwarebytes_free">http://www.malwarebytes.org/products/malwarebytes_free</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fransiscuss.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fransiscuss.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fransiscuss.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fransiscuss.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fransiscuss.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fransiscuss.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fransiscuss.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fransiscuss.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fransiscuss.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fransiscuss.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fransiscuss.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fransiscuss.wordpress.com/407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fransiscuss.wordpress.com/407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fransiscuss.wordpress.com/407/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&#038;blog=26182965&#038;post=407&#038;subd=fransiscuss&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fransiscuss.com/2012/05/28/protection-software-for-my-laptop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/70e5c1d49eb30cdc979601f6e85e962a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fransiscuss</media:title>
		</media:content>
	</item>
		<item>
		<title>Table Spool (Lazy Spool) in SQL Server 2005</title>
		<link>http://fransiscuss.com/2012/05/22/table-spool-lazy-spool-in-sql-server-2005/</link>
		<comments>http://fransiscuss.com/2012/05/22/table-spool-lazy-spool-in-sql-server-2005/#comments</comments>
		<pubDate>Tue, 22 May 2012 05:59:36 +0000</pubDate>
		<dc:creator>fransiscuss</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://fransiscuss.com/?p=404</guid>
		<description><![CDATA[I have a web app that recently timing out and the timing out exception is actually coming from the SQL Server. When I run the execution plan I found that there is one item called Table Spool (Lazy Spool) which is costing about 20%. I thought it was caused by my full text search but [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&#038;blog=26182965&#038;post=404&#038;subd=fransiscuss&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have a web app that recently timing out and the timing out exception is actually coming from the SQL Server. When I run the execution plan I found that there is one item called Table Spool (Lazy Spool) which is costing about 20%. I thought it was caused by my full text search but when I drilled down further more is because of DISTINCT keyword. So I decided to change to use GROUP BY instead. In my case it is only a single column so It won&#8217;t make any difference at all. Once I&#8217;ve changed that my web application running fast and no more timeout</p>
<p>I got this explanation from <a href="http://forums.teradata.com/forum/database/spool-treatment-for-distinct-versus-group-by" target="_blank">this </a>website</p>
<p>Explain Distinct:<br />
3) We do an all-AMPs RETRIEVE step from &#8230; by way of an<br />
all-rows scan with no residual conditions into Spool x<br />
(group_amps), which is redistributed by hash code to all AMPs.<br />
Then we do a SORT to order Spool 1 by the sort key in spool field1<br />
eliminating duplicate rows.</p>
<p>First there&#8217;s a redistribution, then duplicate rows are removed:<br />
Efficient, if there are just a few rows per value [per AMP].<br />
Spool size is always about the same, but may be extremely skewed → 2646: No more Spool Space</p>
<p>Explain Group By:<br />
3) We do an all-AMPs SUM step to aggregate from &#8230; by way<br />
of an all-rows scan with no residual conditions, and the grouping<br />
identifier in field 1025. Aggregate Intermediate Results are<br />
computed globally, then placed in Spool x.</p>
<p>First each AMP removes duplicate rows locally (first aggregate) and hashes/redistributes the resulting<br />
rows, then there&#8217;s a second aggregation to remove duplicate rows:<br />
Efficient, if there are lots of rows per value [per AMP].<br />
Large number of rows per value Spool → small spool size<br />
Small number of rows per value Spool → large spool size<br />
Spool is never skewed.</p>
<p>Other interesting fact quoted from this <a href="http://stackoverflow.com/questions/9720988/sql-server-2005-table-spool-lazy-spool-performance" target="_blank">article/discussion</a></p>
<p><a href="http://www.simple-talk.com/sql/learn-sql-server/showplan-operator-of-the-week---lazy-spool/" rel="nofollow">http://www.simple-talk.com/sql/learn-sql-server/showplan-operator-of-the-week&#8212;lazy-spool/</a></p>
<p>http://www.sql-server-performance.com/forum/threads/table-spool-lazy-spool.15647/</p>
<p><strong>INDEXING</strong>: Take a look at your indices to make sure that they&#8217;re all covering the columns that you&#8217;re selecting out of the tables. You&#8217;ll want to aim to get all the columns included in JOINs and WHERE clauses within the indices. All other columns that are in the SELECT statements should be INCLUDEd, or covered, by the index.</p>
<p><strong>OPERATORS</strong>: See if you can get rid of the not equals (&#8220;&lt;&gt;&#8221;) operators, in favor of a single greater than or less than operator. Can this statement <code>and T.CurrentHorizon &lt;&gt; 0</code> be changed to this <code>and T.CurrentHorizon &gt; 0</code>?</p>
<p><strong>JOINS</strong>: Get rid of the subqueries that are JOINing to tables outside of themselves. For instance, this line <code>and FV2.elementId = FV.elementID</code> might be causing some problems. There&#8217;s no reason you can&#8217;t move that out of a subquery and into a JOIN to <code>dbo.aowCollectedFact FV</code>, given that you&#8217;re GROUPing (DISTINCT) in the main query already.</p>
<p><strong>DISTINCT</strong>: Change it to a GROUP BY. I&#8217;ve got no reason other than, because it&#8217;s good practice and takes two minutes.</p>
<p><strong>LAST NOTE</strong>: The exception to all the above might be to leave the final subquery, the <code>IF NOT EXISTS</code>, as a subquery. If you change it to a JOIN, it&#8217;ll have to be a <code>LEFT JOIN...WHERE NULL</code> statement, which can actually cause spooling operations. No great way to get around that one.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fransiscuss.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fransiscuss.wordpress.com/404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fransiscuss.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fransiscuss.wordpress.com/404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fransiscuss.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fransiscuss.wordpress.com/404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fransiscuss.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fransiscuss.wordpress.com/404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fransiscuss.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fransiscuss.wordpress.com/404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fransiscuss.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fransiscuss.wordpress.com/404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fransiscuss.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fransiscuss.wordpress.com/404/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&#038;blog=26182965&#038;post=404&#038;subd=fransiscuss&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fransiscuss.com/2012/05/22/table-spool-lazy-spool-in-sql-server-2005/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/70e5c1d49eb30cdc979601f6e85e962a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fransiscuss</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple Paging using jQuery -Pajinate</title>
		<link>http://fransiscuss.com/2012/05/21/simple-paging-using-jquery-pajinate/</link>
		<comments>http://fransiscuss.com/2012/05/21/simple-paging-using-jquery-pajinate/#comments</comments>
		<pubDate>Mon, 21 May 2012 03:42:11 +0000</pubDate>
		<dc:creator>fransiscuss</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://fransiscuss.com/?p=398</guid>
		<description><![CDATA[By using this library, it allows you to do the paging through the HTML DOM from the client side  (Note: this is not about the ideal way or not the ideal way, I know the ideal way is to do paging server side) To implement you just need to do 3 things: 1. Create a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&#038;blog=26182965&#038;post=398&#038;subd=fransiscuss&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>By using this library, it allows you to do the paging through the HTML DOM from the client side  (Note: this is not about the ideal way or not the ideal way, I know the ideal way is to do paging server side)</p>
<p>To implement you just need to do 3 things:</p>
<p>1. Create a div container that wraps the container of item that you want to repeat and the navigation div, you can call it whatever you want</p>
<p>2. Create a div inside the container with class &#8220;page_navigation&#8221;</p>
<p>3. put class &#8220;content&#8221; on the container of the list item</p>
<p><strong>Sample</strong></p>
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Snippet</div>
<div style="background:#ddd;max-height:400px;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;" start="1">
<li><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">div</span> <span style="color:#ff0000;">id</span><span style="color:#0000ff;">=&#8221;page_container&#8221;&gt;</span></li>
<li style="background:#f3f3f3;">    <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">div</span> <span style="color:#ff0000;">class</span><span style="color:#0000ff;">=&#8221;page_navigation&#8221;&gt;&lt;/</span><span style="color:#800000;">div</span><span style="color:#0000ff;">&gt;</span></li>
<li>    <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">ul</span> <span style="color:#ff0000;">class</span><span style="color:#0000ff;">=&#8221;content&#8221;&gt;</span></li>
<li style="background:#f3f3f3;">        <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">li</span><span style="color:#0000ff;">&gt;</span></li>
<li>            <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">p</span><span style="color:#0000ff;">&gt;</span>One<span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">p</span><span style="color:#0000ff;">&gt;</span></li>
<li style="background:#f3f3f3;">        <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">li</span><span style="color:#0000ff;">&gt;</span></li>
<li>        <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">li</span><span style="color:#0000ff;">&gt;</span></li>
<li style="background:#f3f3f3;">            <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">p</span><span style="color:#0000ff;">&gt;</span>Two<span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">p</span><span style="color:#0000ff;">&gt;</span></li>
<li>        <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">li</span><span style="color:#0000ff;">&gt;</span></li>
<li style="background:#f3f3f3;">        <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">li</span><span style="color:#0000ff;">&gt;</span></li>
<li>            <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">p</span><span style="color:#0000ff;">&gt;</span>Three<span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">p</span><span style="color:#0000ff;">&gt;</span></li>
<li style="background:#f3f3f3;">        <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">li</span><span style="color:#0000ff;">&gt;</span></li>
<li>        <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">li</span><span style="color:#0000ff;">&gt;</span></li>
<li style="background:#f3f3f3;">            <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">p</span><span style="color:#0000ff;">&gt;</span>Four<span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">p</span><span style="color:#0000ff;">&gt;</span></li>
<li>        <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">li</span><span style="color:#0000ff;">&gt;</span></li>
<li style="background:#f3f3f3;">        <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">li</span><span style="color:#0000ff;">&gt;</span></li>
<li>            <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">p</span><span style="color:#0000ff;">&gt;</span>Five<span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">p</span><span style="color:#0000ff;">&gt;</span></li>
<li style="background:#f3f3f3;">        <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">li</span><span style="color:#0000ff;">&gt;</span></li>
<li>        <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">li</span><span style="color:#0000ff;">&gt;</span></li>
<li style="background:#f3f3f3;">            <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">p</span><span style="color:#0000ff;">&gt;</span>Six<span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">p</span><span style="color:#0000ff;">&gt;</span></li>
<li>        <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">li</span><span style="color:#0000ff;">&gt;</span></li>
<li style="background:#f3f3f3;">        <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">li</span><span style="color:#0000ff;">&gt;</span></li>
<li>            <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">p</span><span style="color:#0000ff;">&gt;</span>Seven<span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">p</span><span style="color:#0000ff;">&gt;</span></li>
<li style="background:#f3f3f3;">        <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">li</span><span style="color:#0000ff;">&gt;</span></li>
<li>        <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">li</span><span style="color:#0000ff;">&gt;</span></li>
<li style="background:#f3f3f3;">            <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">p</span><span style="color:#0000ff;">&gt;</span>Eight<span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">p</span><span style="color:#0000ff;">&gt;</span></li>
<li>        <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">li</span><span style="color:#0000ff;">&gt;</span></li>
<li style="background:#f3f3f3;">    <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">ul</span><span style="color:#0000ff;">&gt;</span></li>
<li><span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">div</span><span style="color:#0000ff;">&gt;</span></li>
</ol>
</div>
</div>
<p>and I put this code on the document.ready event based on the id set on item 1</p>
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Snippet</div>
<div style="background:#ddd;max-height:300px;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;" start="1">
<li><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">SCRIPT</span><span style="color:#0000ff;">&gt;</span></li>
<li style="background:#f3f3f3;">    jQuery(document).ready(<span style="color:#0000ff;">function</span> () {</li>
<li>        jQuery(<span style="color:#800000;">&#8216;#page_container&#8217;</span>).pajinate({ items_per_page: 2 });</li>
<li style="background:#f3f3f3;">    });</li>
<li><span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">SCRIPT</span><span style="color:#0000ff;">&gt;</span></li>
</ol>
</div>
</div>
<p>The source code can be downloaded from <a title="jQuery Pajinate" href="http://dl.dropbox.com/u/4151695/th3silverlining/pajinate.zip" target="_blank">here</a></p>
<p>and you can read the documentation from this <a href="https://github.com/wesnolte/Pajinate/wiki" target="_blank">github </a>page</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fransiscuss.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fransiscuss.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fransiscuss.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fransiscuss.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fransiscuss.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fransiscuss.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fransiscuss.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fransiscuss.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fransiscuss.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fransiscuss.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fransiscuss.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fransiscuss.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fransiscuss.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fransiscuss.wordpress.com/398/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&#038;blog=26182965&#038;post=398&#038;subd=fransiscuss&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fransiscuss.com/2012/05/21/simple-paging-using-jquery-pajinate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/70e5c1d49eb30cdc979601f6e85e962a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fransiscuss</media:title>
		</media:content>
	</item>
		<item>
		<title>Yield keyword in .NET</title>
		<link>http://fransiscuss.com/2012/05/20/yield-keyword-in-net/</link>
		<comments>http://fransiscuss.com/2012/05/20/yield-keyword-in-net/#comments</comments>
		<pubDate>Sun, 20 May 2012 23:35:15 +0000</pubDate>
		<dc:creator>fransiscuss</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://fransiscuss.com/?p=396</guid>
		<description><![CDATA[I believe some of you already know about this but for me I never used it. Yield keyword has been existed since .NET 2.0 so I decided to look up of what it does and try to understand it Based on MSDN Yield is used in an iterator block to provide a value to the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&#038;blog=26182965&#038;post=396&#038;subd=fransiscuss&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I believe some of you already know about this but for me I never used it. Yield keyword has been existed since .NET 2.0 so I decided to look up of what it does and try to understand it</p>
<p>Based on <a href="http://msdn.microsoft.com/en-us/library/9k7k7cf0%28v=vs.80%29.aspx" target="_blank">MSDN </a></p>
<p>Yield is used in an iterator block to provide a value to the enumerator object or to signal the end of iteration, it takes one of the following form</p>
<p>Based on my understanding</p>
<p>Yield is a concatenation for a collection, or in SQL we normally use UNION</p>
<p>Yield break; is used to exit from the concatenation (remember it is not used to skip !)</p>
<p>One practical sample that I can think of is to get the enumerable of exception from inner exception (e.g stack trace)</p>
<p><strong>sample code</strong></p>
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Snippet</div>
<div style="background:#ddd;max-height:300px;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;" start="8">
<li><span style="color:#0000ff;">class</span> <span style="color:#2b91af;">Program</span></li>
<li style="background:#f3f3f3;">    {</li>
<li>        <span style="color:#808080;">///</span><span style="color:#808080;">&lt;summary&gt;</span></li>
<li style="background:#f3f3f3;">        <span style="color:#808080;">///</span><span style="color:#008000;"> simple function to return IEnumerable of integer</span></li>
<li>        <span style="color:#808080;">///</span><span style="color:#808080;">&lt;/summary&gt;</span></li>
<li style="background:#f3f3f3;">        <span style="color:#808080;">///</span><span style="color:#808080;">&lt;returns&gt;&lt;/returns&gt;</span></li>
<li>        <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">static</span> <span style="color:#2b91af;">IEnumerable</span>&lt;<span style="color:#0000ff;">int</span>&gt; GetIntegers()</li>
<li style="background:#f3f3f3;">        {</li>
<li>            <span style="color:#0000ff;">for</span> (<span style="color:#0000ff;">int</span> i = 0; i &lt;= 10; i++)</li>
<li style="background:#f3f3f3;">                <span style="color:#0000ff;">yield</span> <span style="color:#0000ff;">return</span> i;</li>
<li>        }</li>
<li style="background:#f3f3f3;"></li>
<li>        <span style="color:#808080;">///</span><span style="color:#808080;">&lt;summary&gt;</span></li>
<li style="background:#f3f3f3;">        <span style="color:#808080;">///</span><span style="color:#008000;"> simple function to return collection of class</span></li>
<li>        <span style="color:#808080;">///</span><span style="color:#808080;">&lt;/summary&gt;</span></li>
<li style="background:#f3f3f3;">        <span style="color:#808080;">///</span><span style="color:#808080;">&lt;returns&gt;&lt;/returns&gt;</span></li>
<li>        <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">static</span> <span style="color:#2b91af;">IEnumerable</span>&lt;<span style="color:#2b91af;">MyClass</span>&gt; GetMyNumbers()</li>
<li style="background:#f3f3f3;">        {</li>
<li>            <span style="color:#0000ff;">for</span> (<span style="color:#0000ff;">int</span> i = 0; i &lt;= 10; i++)</li>
<li style="background:#f3f3f3;">                <span style="color:#0000ff;">if</span> (i &gt; 5)</li>
<li>                    <span style="color:#0000ff;">yield</span> <span style="color:#0000ff;">break</span>;</li>
<li style="background:#f3f3f3;">                <span style="color:#0000ff;">else</span></li>
<li>                    <span style="color:#0000ff;">yield</span> <span style="color:#0000ff;">return</span> <span style="color:#0000ff;">new</span> <span style="color:#2b91af;">MyClass</span>() { Number = i };</li>
<li style="background:#f3f3f3;">        }</li>
<li></li>
<li style="background:#f3f3f3;">        <span style="color:#0000ff;">internal</span> <span style="color:#0000ff;">class</span> <span style="color:#2b91af;">MyClass</span></li>
<li>        {</li>
<li style="background:#f3f3f3;">            <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">int</span> Number { <span style="color:#0000ff;">get</span>; <span style="color:#0000ff;">set</span>; }</li>
<li>            <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">string</span> PrintNumber</li>
<li style="background:#f3f3f3;">            {</li>
<li>                <span style="color:#0000ff;">get</span> {</li>
<li style="background:#f3f3f3;">                    <span style="color:#0000ff;">return</span> <span style="color:#a31515;">&#8220;This is no &#8220;</span> + Number.ToString();</li>
<li>                }</li>
<li style="background:#f3f3f3;">            }</li>
<li>        }</li>
<li style="background:#f3f3f3;"></li>
<li>        <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">void</span> Main(<span style="color:#0000ff;">string</span>[] args)</li>
<li style="background:#f3f3f3;">        {</li>
<li>            <span style="color:#2b91af;">Console</span>.WriteLine(<span style="color:#a31515;">&#8220;Simple array of integer&#8221;</span>);</li>
<li style="background:#f3f3f3;">            <span style="color:#0000ff;">foreach</span> (<span style="color:#0000ff;">var</span> number <span style="color:#0000ff;">in</span> GetIntegers())</li>
<li>                <span style="color:#2b91af;">Console</span>.WriteLine(number.ToString());</li>
<li style="background:#f3f3f3;"></li>
<li>            <span style="color:#2b91af;">Console</span>.WriteLine();</li>
<li style="background:#f3f3f3;">            <span style="color:#2b91af;">Console</span>.WriteLine(<span style="color:#a31515;">&#8220;Collection of classes&#8221;</span>);</li>
<li>            <span style="color:#0000ff;">foreach</span> (<span style="color:#0000ff;">var</span> myclass <span style="color:#0000ff;">in</span> GetMyNumbers())</li>
<li style="background:#f3f3f3;">                <span style="color:#2b91af;">Console</span>.WriteLine(myclass.PrintNumber);</li>
<li></li>
<li style="background:#f3f3f3;">            <span style="color:#2b91af;">Console</span>.ReadLine();</li>
<li>        }</li>
<li style="background:#f3f3f3;">    }</li>
</ol>
</div>
</div>
<p><strong>Output</strong></p>
<div>Simple array of an integer<br />
0<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
9<br />
10Collection of classes<br />
This is no 0<br />
This is no 1<br />
This is no 2<br />
This is no 3<br />
This is no 4<br />
This is no 5</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fransiscuss.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fransiscuss.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fransiscuss.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fransiscuss.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fransiscuss.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fransiscuss.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fransiscuss.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fransiscuss.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fransiscuss.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fransiscuss.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fransiscuss.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fransiscuss.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fransiscuss.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fransiscuss.wordpress.com/396/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&#038;blog=26182965&#038;post=396&#038;subd=fransiscuss&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fransiscuss.com/2012/05/20/yield-keyword-in-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/70e5c1d49eb30cdc979601f6e85e962a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fransiscuss</media:title>
		</media:content>
	</item>
		<item>
		<title>Knockout MVVM Javascript</title>
		<link>http://fransiscuss.com/2012/05/20/knockout-mvvm-javascript/</link>
		<comments>http://fransiscuss.com/2012/05/20/knockout-mvvm-javascript/#comments</comments>
		<pubDate>Sun, 20 May 2012 21:23:42 +0000</pubDate>
		<dc:creator>fransiscuss</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Knockout]]></category>
		<category><![CDATA[MVVM]]></category>

		<guid isPermaLink="false">http://fransiscuss.com/?p=394</guid>
		<description><![CDATA[Knockout allows you to bind the HTML to your javascript object. It simplifies DOM manipulation and allow the portability of the javascript object and action. It is pretty much the same concept as MVVM in silverlight. You can wire up the function with button click easily, you can have for each against your array (e.g [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&#038;blog=26182965&#038;post=394&#038;subd=fransiscuss&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Knockout allows you to bind the HTML to your javascript object. It simplifies DOM manipulation and allow the portability of the javascript object and action. It is pretty much the same concept as MVVM in silverlight. You can wire up the function with button click easily, you can have for each against your array (e.g like repeater). It is so elegant, but debugging sometimes can be challenging as well. I&#8217;ve used Knockout along with JSON that allows me to build rich and interactive website</p>
<p>2 powerful function: ko.observable &#8211; this allow knockout to monitor this object value, ko.observableArray this is the extension of ko.observable against the array. With observable, knockout will keep tracking the value of that property and allow the DOM that has been bind against it to refresh</p>
<p>You can bind initial data from your MVC model to the variable in javascript and bind it, in this sample below, I use ToJson extension function</p>
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Snippet</div>
<div style="background:#ddd;max-height:300px;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;" start="6">
<li><span style="color:#0000ff;">namespace</span> System.Web.Mvc</li>
<li style="background:#f3f3f3;">{</li>
<li>    <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">class</span> <span style="color:#2b91af;">HtmlHelperExtensions</span></li>
<li style="background:#f3f3f3;">    {</li>
<li>        <span style="color:#808080;">///</span><span style="color:#808080;">&lt;summary&gt;</span></li>
<li style="background:#f3f3f3;">        <span style="color:#808080;">///</span><span style="color:#008000;"> Serializes an object to Javascript Object Notation.</span></li>
<li>        <span style="color:#808080;">///</span><span style="color:#808080;">&lt;/summary&gt;</span></li>
<li style="background:#f3f3f3;">        <span style="color:#808080;">///</span><span style="color:#808080;">&lt;param name=&#8221;item&#8221;&gt;</span><span style="color:#008000;">The item to serialize.</span><span style="color:#808080;">&lt;/param&gt;</span></li>
<li>        <span style="color:#808080;">///</span><span style="color:#808080;">&lt;returns&gt;</span></li>
<li style="background:#f3f3f3;">        <span style="color:#808080;">///</span><span style="color:#008000;"> The item serialized as Json.</span></li>
<li>        <span style="color:#808080;">///</span><span style="color:#808080;">&lt;/returns&gt;</span></li>
<li style="background:#f3f3f3;">        <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">string</span> ToJson(<span style="color:#0000ff;">this</span> <span style="color:#0000ff;">object</span> item)</li>
<li>        {</li>
<li style="background:#f3f3f3;">            <span style="color:#0000ff;">return</span> <span style="color:#0000ff;">new</span> System.Web.Script.Serialization.<span style="color:#2b91af;">JavaScriptSerializer</span>().Serialize(item);</li>
<li>        }</li>
<li style="background:#f3f3f3;">    }</li>
<li>}</li>
</ol>
</div>
</div>
<p><strong>Sample code</strong></p>
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Snippet</div>
<div style="background:#ddd;max-height:300px;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;" start="5">
<li><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">script</span> <span style="color:#ff0000;">type</span><span style="color:#0000ff;">=&#8221;text/javascript&#8221;&gt;</span></li>
<li style="background:#f3f3f3;">    <span style="color:#0000ff;">var</span> initialData = <span style="background:#ffff00;">@(</span><span style="color:#0000ff;">new</span> <span style="color:#2b91af;">MvcHtmlString</span>(Model.ToJson())<span style="background:#ffff00;">)</span>;</li>
<li></li>
<li style="background:#f3f3f3;">    <span style="color:#0000ff;">function</span> JobResultViewModel()</li>
<li>    {</li>
<li style="background:#f3f3f3;">        <span style="color:#0000ff;">var</span> self = <span style="color:#0000ff;">this</span>;</li>
<li>        self.Jobs = ko.observableArray(initialData.JobSearchResults);</li>
<li style="background:#f3f3f3;">        self.Search = ko.observable(initialData.JobSearchModel);</li>
<li>        self.Pageno = ko.observable(initialData.PageNo);</li>
<li style="background:#f3f3f3;">        self.TotalPage = ko.observable(initialData.TotalPage);</li>
<li>        self.TotalRecord = initialData.TotalRecord;</li>
<li style="background:#f3f3f3;">        self.ShowNextButton = ko.computed(<span style="color:#0000ff;">function</span>(){</li>
<li>                                            <span style="color:#0000ff;">return</span> self.Pageno() &lt; (self.TotalPage() &#8211; 1);</li>
<li style="background:#f3f3f3;">                                            });</li>
<li>        self.LoadNextPage = <span style="color:#0000ff;">function</span>() {</li>
<li style="background:#f3f3f3;">                               $.getJSON(<span style="color:#800000;">&#8216;</span><span style="background:#ffff00;color:#800000;">@</span>Url.Action(<span style="color:#a31515;">&#8220;ResultJson&#8221;</span>)<span style="color:#800000;">&#8216;</span>, {  Keyword: (self.Search().Keyword == <span style="color:#0000ff;">null</span>) ? <span style="color:#800000;">&#8220;&#8221;</span> : self.Search().Keyword,</li>
<li>                                                                      ProfessionId: self.Search().ProfessionId,</li>
<li style="background:#f3f3f3;">                                                                      RoleIds: self.Search().RoleId,</li>
<li>                                                                      SalaryTypeId: self.Search().SalaryTypeId,</li>
<li style="background:#f3f3f3;">                                                                      SalaryFromId: self.Search().SalaryFromId,</li>
<li>                                                                      SalaryToId: self.Search().SalaryToId,</li>
<li style="background:#f3f3f3;">                                                                      LocationId: self.Search().LocationId,</li>
<li>                                                                      AreaIds: (self.Search().AreaId.length == 0) ? 0 : self.Search().AreaId,</li>
<li style="background:#f3f3f3;">                                                                      WorkTypeId: self.Search().WorkTypeId,</li>
<li>                                                                      Pageno: self.Pageno() + 1</li>
<li style="background:#f3f3f3;">                                                                   }, <span style="color:#0000ff;">function</span> (SearchResult) {</li>
<li>                                                                            $.each(SearchResult, <span style="color:#0000ff;">function</span>(i, item)</li>
<li style="background:#f3f3f3;">                                                                            {</li>
<li>                                                                                self.Jobs.push(item);</li>
<li style="background:#f3f3f3;">                                                                            });</li>
<li></li>
<li style="background:#f3f3f3;">                                                                            self.Pageno(self.Pageno() + 1);</li>
<li></li>
<li style="background:#f3f3f3;">                                                                            <span style="color:#006400;">//we need to refresh the repeater when we use jquery mobile ONLY</span></li>
<li>                                                                            $(<span style="color:#800000;">&#8220;#JobRepeater&#8221;</span>).listview(<span style="color:#800000;">&#8220;refresh&#8221;</span>);</li>
<li style="background:#f3f3f3;">                                                                        });</li>
<li>                                        }</li>
<li style="background:#f3f3f3;"></li>
<li>    }</li>
<li style="background:#f3f3f3;"></li>
<li>    ko.applyBindings(<span style="color:#0000ff;">new</span> JobResultViewModel());</li>
<li style="background:#f3f3f3;"><span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">script</span><span style="color:#0000ff;">&gt;</span></li>
<li><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">h2</span><span style="color:#0000ff;">&gt;</span>Result<span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">h2</span><span style="color:#0000ff;">&gt;</span></li>
<li style="background:#f3f3f3;"></li>
<li><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">h1</span><span style="color:#0000ff;">&gt;</span>There are <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">span</span> <span style="color:#ff0000;">data-bind</span><span style="color:#0000ff;">=&#8221;text: TotalRecord&#8221;&gt;&lt;/</span><span style="color:#800000;">span</span><span style="color:#0000ff;">&gt;</span> jobs<span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">h1</span><span style="color:#0000ff;">&gt;</span></li>
<li style="background:#f3f3f3;"><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">a</span><span style="color:#0000ff;">&gt;</span>Save Search<span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">a</span><span style="color:#0000ff;">&gt;</span></li>
<li><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">ul</span> <span style="color:#ff0000;">name</span><span style="color:#0000ff;">=&#8221;JobRepeater&#8221;</span> <span style="color:#ff0000;">id</span><span style="color:#0000ff;">=&#8221;JobRepeater&#8221;</span> <span style="color:#ff0000;">data-role</span><span style="color:#0000ff;">=&#8221;listview&#8221;</span> <span style="color:#ff0000;">data-bind</span><span style="color:#0000ff;">=&#8221;foreach: Jobs&#8221;&gt;</span></li>
<li style="background:#f3f3f3;">    <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">li</span><span style="color:#0000ff;">&gt;&lt;</span><span style="color:#800000;">a</span> <span style="color:#ff0000;">data-bind</span><span style="color:#0000ff;">=&#8221;attr: { href: UrlAction, title: JobName },text : JobName&#8221;&gt;&lt;/</span><span style="color:#800000;">a</span><span style="color:#0000ff;">&gt;&lt;</span><span style="color:#800000;">span</span> <span style="color:#ff0000;">data-bind</span><span style="color:#0000ff;">=&#8221;text: Description&#8221;&gt;&lt;/</span><span style="color:#800000;">span</span><span style="color:#0000ff;">&gt;&lt;/</span><span style="color:#800000;">li</span><span style="color:#0000ff;">&gt;</span></li>
<li><span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">ul</span><span style="color:#0000ff;">&gt;</span></li>
<li style="background:#f3f3f3;"><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">div</span> <span style="color:#ff0000;">data-bind</span><span style="color:#0000ff;">=&#8221;visible: ShowNextButton&#8221;&gt;</span></li>
<li>    <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">input</span> <span style="color:#ff0000;">type</span><span style="color:#0000ff;">=&#8221;button&#8221;</span> <span style="color:#ff0000;">id</span><span style="color:#0000ff;">=&#8221;btn_load_next&#8221;</span> <span style="color:#ff0000;">value</span><span style="color:#0000ff;">=&#8221;Load More&#8221;</span> <span style="color:#ff0000;">data-bind</span><span style="color:#0000ff;">=&#8221;click: LoadNextPage&#8221;/&gt;</span></li>
<li style="background:#f3f3f3;"><span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">div</span><span style="color:#0000ff;">&gt;</span></li>
</ol>
</div>
</div>
<p>Source:</p>
<p><a title="Knockout Tutorial" href="http://learn.knockoutjs.com/" target="_blank">Knockout Tutorial</a></p>
<p><a title="Knockout Tips" href="http://www.knockmeout.net/2011/06/10-things-to-know-about-knockoutjs-on.html" target="_blank">Knockout Tips</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fransiscuss.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fransiscuss.wordpress.com/394/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fransiscuss.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fransiscuss.wordpress.com/394/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fransiscuss.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fransiscuss.wordpress.com/394/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fransiscuss.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fransiscuss.wordpress.com/394/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fransiscuss.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fransiscuss.wordpress.com/394/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fransiscuss.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fransiscuss.wordpress.com/394/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fransiscuss.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fransiscuss.wordpress.com/394/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&#038;blog=26182965&#038;post=394&#038;subd=fransiscuss&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fransiscuss.com/2012/05/20/knockout-mvvm-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/70e5c1d49eb30cdc979601f6e85e962a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fransiscuss</media:title>
		</media:content>
	</item>
		<item>
		<title>Custom Authorize Attribute and  HTTP 403</title>
		<link>http://fransiscuss.com/2012/05/20/custom-authorize-attribute-and-http-403/</link>
		<comments>http://fransiscuss.com/2012/05/20/custom-authorize-attribute-and-http-403/#comments</comments>
		<pubDate>Sun, 20 May 2012 20:46:46 +0000</pubDate>
		<dc:creator>fransiscuss</dc:creator>
				<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[Custom Authorize]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[MVC]]></category>

		<guid isPermaLink="false">http://fransiscuss.com/?p=392</guid>
		<description><![CDATA[In this post, I want to outline in how to create your own Authorize tag and to make sure when you call JSON method with your custom authorize attribute to throw HTTP403 &#8211; Forbidden 1. You need to create your own Attribute inherits from AuthorizeAttribute 2. AuthorizeCore is the logic that defines whether you are [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&#038;blog=26182965&#038;post=392&#038;subd=fransiscuss&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In this post, I want to outline in how to create your own Authorize tag and to make sure when you call JSON method with your custom authorize attribute to throw HTTP403 &#8211; Forbidden</p>
<p>1. You need to create your own Attribute inherits from AuthorizeAttribute</p>
<p>2. AuthorizeCore is the logic that defines whether you are authorized or not</p>
<p>3. OnAuthorization defines the behaviour when you are not authorized. In this case we want to throw HTTP 403 &#8211; forbidden. By doing this in your Javascript, you can catch this 403 error and throw friendly error message to the user</p>
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Snippet</div>
<div style="background:#ddd;max-height:300px;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;" start="10">
<li><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> <span style="color:#2b91af;">CustomAuthorizeAttribute</span> : <span style="color:#2b91af;">AuthorizeAttribute</span></li>
<li style="background:#f3f3f3;">    {</li>
<li>        <span style="color:#0000ff;">protected</span> <span style="color:#0000ff;">override</span> <span style="color:#0000ff;">bool</span> AuthorizeCore(<span style="color:#2b91af;">HttpContextBase</span> httpContext)</li>
<li style="background:#f3f3f3;">        {</li>
<li>            <span style="color:#0000ff;">if</span> (httpContext == <span style="color:#0000ff;">null</span>) <span style="color:#0000ff;">throw</span> <span style="color:#0000ff;">new</span> <span style="color:#2b91af;">ArgumentNullException</span>(<span style="color:#a31515;">&#8220;httpContext&#8221;</span>);</li>
<li style="background:#f3f3f3;">            <span style="color:#0000ff;">return</span> (<span style="color:#2b91af;">SessionData</span>.Member != <span style="color:#0000ff;">null</span> &amp;&amp; <span style="color:#2b91af;">SessionData</span>.Member.MemberId &gt; 0);</li>
<li>        }</li>
<li style="background:#f3f3f3;"></li>
<li>        <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">override</span> <span style="color:#0000ff;">void</span> OnAuthorization(<span style="color:#2b91af;">AuthorizationContext</span> filterContext)</li>
<li style="background:#f3f3f3;">        {</li>
<li>            <span style="color:#0000ff;">base</span>.OnAuthorization(filterContext);</li>
<li style="background:#f3f3f3;">            <span style="color:#0000ff;">if</span> (filterContext.Result == <span style="color:#0000ff;">null</span>)</li>
<li>            {</li>
<li style="background:#f3f3f3;">                <span style="color:#0000ff;">return</span>;</li>
<li>            }</li>
<li style="background:#f3f3f3;">            <span style="color:#0000ff;">else</span> <span style="color:#0000ff;">if</span> (filterContext.Result.GetType() == <span style="color:#0000ff;">typeof</span>(<span style="color:#2b91af;">HttpUnauthorizedResult</span>)</li>
<li>                &amp;&amp; filterContext.HttpContext.Request.IsAjaxRequest())</li>
<li style="background:#f3f3f3;">            {</li>
<li>                filterContext.Result = <span style="color:#0000ff;">new</span> <span style="color:#2b91af;">ContentResult</span>();</li>
<li style="background:#f3f3f3;">                filterContext.HttpContext.Response.StatusCode = 403;</li>
<li>            }</li>
<li style="background:#f3f3f3;">        }</li>
<li>    }</li>
</ol>
</div>
</div>
<p>You don&#8217;t need to do anything in your controller to implement HTTP403, it is all derived from the custom attribute, you just need to use the attribute and everything will be taken care of. Sample usage</p>
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Snippet</div>
<div style="background:#ddd;max-height:300px;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 3em;padding:0 0 0 5px;" start="204">
<li>[<span style="color:#2b91af;">CustomAuthorize</span>]</li>
<li style="background:#f3f3f3;">        <span style="color:#0000ff;">public</span> <span style="color:#2b91af;">ActionResult</span> SaveJobJSON(<span style="color:#0000ff;">int</span> jobid)</li>
<li>        {</li>
<li style="background:#f3f3f3;">            <span style="color:#0000ff;">string</span> message = <span style="color:#0000ff;">string</span>.Empty;</li>
<li>            <span style="color:#0000ff;">bool</span> successful = <span style="color:#0000ff;">false</span>;</li>
<li style="background:#f3f3f3;"></li>
<li>            <span style="color:#2b91af;">JobsSavedService</span> JobsSavedService = <span style="color:#0000ff;">new</span> <span style="color:#2b91af;">JobsSavedService</span>();</li>
<li style="background:#f3f3f3;">            successful = JobsSavedService.SavedJobForMember(jobid, <span style="color:#0000ff;">ref</span> message);</li>
<li>            JobsSavedService = <span style="color:#0000ff;">null</span>;</li>
<li style="background:#f3f3f3;"></li>
<li>            <span style="color:#0000ff;">return</span> Json(<span style="color:#0000ff;">new</span> { successful = successful, message = message }, <span style="color:#2b91af;">JsonRequestBehavior</span>.AllowGet);</li>
<li style="background:#f3f3f3;">        }</li>
</ol>
</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fransiscuss.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fransiscuss.wordpress.com/392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fransiscuss.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fransiscuss.wordpress.com/392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fransiscuss.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fransiscuss.wordpress.com/392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fransiscuss.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fransiscuss.wordpress.com/392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fransiscuss.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fransiscuss.wordpress.com/392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fransiscuss.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fransiscuss.wordpress.com/392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fransiscuss.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fransiscuss.wordpress.com/392/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&#038;blog=26182965&#038;post=392&#038;subd=fransiscuss&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fransiscuss.com/2012/05/20/custom-authorize-attribute-and-http-403/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/70e5c1d49eb30cdc979601f6e85e962a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fransiscuss</media:title>
		</media:content>
	</item>
		<item>
		<title>Browser Extension Plugin for VS2010</title>
		<link>http://fransiscuss.com/2012/05/20/browser-extension-plugin-for-vs2010/</link>
		<comments>http://fransiscuss.com/2012/05/20/browser-extension-plugin-for-vs2010/#comments</comments>
		<pubDate>Sun, 20 May 2012 03:43:14 +0000</pubDate>
		<dc:creator>fransiscuss</dc:creator>
				<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://fransiscuss.com/2012/05/20/browser-extension-plugin-for-vs2010/</guid>
		<description><![CDATA[This is a nice extension for VS2010 to allow you to change the default browser on debugging mode http://visualstudiogallery.msdn.microsoft.com/bb424812-f742-41ef-974a-cdac607df921<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&#038;blog=26182965&#038;post=389&#038;subd=fransiscuss&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is a nice extension for VS2010 to allow you to change the default browser on debugging mode</p>
<p><a href="http://visualstudiogallery.msdn.microsoft.com/bb424812-f742-41ef-974a-cdac607df921">http://visualstudiogallery.msdn.microsoft.com/bb424812-f742-41ef-974a-cdac607df921</a></p>
<h1></h1>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fransiscuss.wordpress.com/389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fransiscuss.wordpress.com/389/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fransiscuss.wordpress.com/389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fransiscuss.wordpress.com/389/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fransiscuss.wordpress.com/389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fransiscuss.wordpress.com/389/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fransiscuss.wordpress.com/389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fransiscuss.wordpress.com/389/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fransiscuss.wordpress.com/389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fransiscuss.wordpress.com/389/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fransiscuss.wordpress.com/389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fransiscuss.wordpress.com/389/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fransiscuss.wordpress.com/389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fransiscuss.wordpress.com/389/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&#038;blog=26182965&#038;post=389&#038;subd=fransiscuss&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fransiscuss.com/2012/05/20/browser-extension-plugin-for-vs2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/70e5c1d49eb30cdc979601f6e85e962a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fransiscuss</media:title>
		</media:content>
	</item>
		<item>
		<title>Trello &#8211; Collaboration TODO Web App</title>
		<link>http://fransiscuss.com/2012/05/18/trello-collaboration-todo-web-app/</link>
		<comments>http://fransiscuss.com/2012/05/18/trello-collaboration-todo-web-app/#comments</comments>
		<pubDate>Fri, 18 May 2012 01:05:40 +0000</pubDate>
		<dc:creator>fransiscuss</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://fransiscuss.com/2012/05/18/trello-collaboration-todo-web-app/</guid>
		<description><![CDATA[My manager recommended us to check this website in order to help us keep tracking of what need to be done What I like is the simple UI and easy to use. It helps people to manage their projects and resources or even it helps you to organise your daily activities. It is free to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&#038;blog=26182965&#038;post=388&#038;subd=fransiscuss&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>My manager recommended us to check this website in order to help us keep tracking of what need to be done</p>
<p>What I like is the simple UI and easy to use. It helps people to manage their projects and resources or even it helps you to organise your daily activities. It is free to use as well</p>
<p><a href="http://trello.com">http://trello.com</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fransiscuss.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fransiscuss.wordpress.com/388/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fransiscuss.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fransiscuss.wordpress.com/388/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fransiscuss.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fransiscuss.wordpress.com/388/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fransiscuss.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fransiscuss.wordpress.com/388/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fransiscuss.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fransiscuss.wordpress.com/388/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fransiscuss.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fransiscuss.wordpress.com/388/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fransiscuss.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fransiscuss.wordpress.com/388/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&#038;blog=26182965&#038;post=388&#038;subd=fransiscuss&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fransiscuss.com/2012/05/18/trello-collaboration-todo-web-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/70e5c1d49eb30cdc979601f6e85e962a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fransiscuss</media:title>
		</media:content>
	</item>
		<item>
		<title>Log4Net &#8211; Logging for .NET</title>
		<link>http://fransiscuss.com/2012/05/16/log4net-logging-for-net/</link>
		<comments>http://fransiscuss.com/2012/05/16/log4net-logging-for-net/#comments</comments>
		<pubDate>Wed, 16 May 2012 03:35:07 +0000</pubDate>
		<dc:creator>fransiscuss</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[code implementation]]></category>
		<category><![CDATA[code snippet]]></category>

		<guid isPermaLink="false">http://fransiscuss.com/?p=384</guid>
		<description><![CDATA[Before I was thinking of rewriting my own logging for my application but after having a careful thought, I decided just to get one from NuGet package instead of reinventing the wheel. I heard a lot about Log4Net and decided to try that out. It&#8217;s really simple to get this logging up and running on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&#038;blog=26182965&#038;post=384&#038;subd=fransiscuss&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Before I was thinking of rewriting my own logging for my application but after having a careful thought, I decided just to get one from NuGet package instead of reinventing the wheel. I heard a lot about Log4Net and decided to try that out. It&#8217;s really simple to get this logging up and running on your application</p>
<p>This is what you need to do:</p>
<p>1. install Log4Net from NuGet</p>
<p>2. Modify your web.config to add a new section and new configuration &#8211; In this case, I decided to use FileLogger. but you can have different type logger if you want (e.g event log, console, etc) or you can even build your own one that implemented ILog, this configuration allow you to create a new log file when the log file already reached the limit</p>
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Snippet</div>
<div style="background:#ddd;max-height:300px;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;" start="11">
<li><span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">configSections</span><span style="color:#0000ff;">&gt;</span></li>
<li style="background:#f3f3f3;">    <span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">section</span><span style="color:#ff0000;"> name</span><span style="color:#0000ff;">=</span>&#8220;<span style="color:#0000ff;">log4net</span>&#8221; <span style="color:#ff0000;">type</span><span style="color:#0000ff;">=</span>&#8220;<span style="color:#0000ff;">log4net.Config.Log4NetConfigurationSectionHandler, log4net</span>&#8220;<span style="color:#0000ff;"> /&gt;</span></li>
<li>  <span style="color:#0000ff;">&lt;/</span><span style="color:#a31515;">configSections</span><span style="color:#0000ff;">&gt;</span></li>
<li style="background:#f3f3f3;"></li>
<li>  <span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">log4net</span><span style="color:#0000ff;">&gt;</span></li>
<li style="background:#f3f3f3;">    <span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">root</span><span style="color:#0000ff;">&gt;</span></li>
<li>      <span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">level</span><span style="color:#ff0000;">value</span><span style="color:#0000ff;">=</span>&#8220;<span style="color:#0000ff;">DEBUG</span>&#8220;<span style="color:#0000ff;"> /&gt;</span></li>
<li style="background:#f3f3f3;">      <span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">appender-ref </span><span style="color:#ff0000;">ref</span><span style="color:#0000ff;">=</span>&#8220;<span style="color:#0000ff;">LogFileAppender</span>&#8220;<span style="color:#0000ff;"> /&gt;</span></li>
<li>    <span style="color:#0000ff;">&lt;/</span><span style="color:#a31515;">root</span><span style="color:#0000ff;">&gt;</span></li>
<li style="background:#f3f3f3;">    <span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">appender </span><span style="color:#ff0000;">name</span><span style="color:#0000ff;">=</span>&#8220;<span style="color:#0000ff;">LogFileAppender</span>&#8220;<span style="color:#ff0000;"> type</span><span style="color:#0000ff;">=</span>&#8220;<span style="color:#0000ff;">log4net.Appender.RollingFileAppender</span>&#8220;<span style="color:#0000ff;"> &gt;</span></li>
<li>      <span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">param </span><span style="color:#ff0000;">name</span><span style="color:#0000ff;">=</span>&#8220;<span style="color:#0000ff;">File</span>&#8221; <span style="color:#ff0000;">value</span><span style="color:#0000ff;">=</span>&#8220;<span style="color:#0000ff;">C:\\log.txt</span>&#8220;<span style="color:#0000ff;"> /&gt;</span></li>
<li style="background:#f3f3f3;">      <span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">param </span><span style="color:#ff0000;">name</span><span style="color:#0000ff;">=</span>&#8220;<span style="color:#0000ff;">AppendToFile</span>&#8221; <span style="color:#ff0000;">value</span><span style="color:#0000ff;">=</span>&#8220;<span style="color:#0000ff;">true</span>&#8220;<span style="color:#0000ff;"> /&gt;</span></li>
<li>      <span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">rollingStyle </span><span style="color:#ff0000;">value</span><span style="color:#0000ff;">=</span>&#8220;<span style="color:#0000ff;">Size</span>&#8220;<span style="color:#0000ff;"> /&gt;</span></li>
<li style="background:#f3f3f3;">      <span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">maxSizeRollBackups</span><span style="color:#ff0000;"> value</span><span style="color:#0000ff;">=</span>&#8220;<span style="color:#0000ff;">10</span>&#8220;<span style="color:#0000ff;"> /&gt;</span></li>
<li>      <span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">maximumFileSize</span><span style="color:#ff0000;"> value</span><span style="color:#0000ff;">=</span>&#8220;<span style="color:#0000ff;">10MB</span>&#8220;<span style="color:#0000ff;"> /&gt;</span></li>
<li style="background:#f3f3f3;">      <span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">staticLogFileName</span><span style="color:#ff0000;"> value</span><span style="color:#0000ff;">=</span>&#8220;<span style="color:#0000ff;">true</span>&#8220;<span style="color:#0000ff;"> /&gt;</span></li>
<li>      <span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">layout </span><span style="color:#ff0000;">type</span><span style="color:#0000ff;">=</span>&#8220;<span style="color:#0000ff;">log4net.Layout.PatternLayout</span>&#8220;<span style="color:#0000ff;">&gt;</span></li>
<li style="background:#f3f3f3;">        <span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">param</span><span style="color:#ff0000;"> name</span><span style="color:#0000ff;">=</span>&#8220;<span style="color:#0000ff;">ConversionPattern</span>&#8220;<span style="color:#ff0000;"> value</span><span style="color:#0000ff;">=</span>&#8220;<span style="color:#0000ff;">%-5p%d{yyyy-MM-dd hh:mm:ss} – %m%n</span>&#8220;<span style="color:#0000ff;"> /&gt;</span></li>
<li>      <span style="color:#0000ff;">&lt;/</span><span style="color:#a31515;">layout</span><span style="color:#0000ff;">&gt;</span></li>
<li style="background:#f3f3f3;">    <span style="color:#0000ff;">&lt;/</span><span style="color:#a31515;">appender</span><span style="color:#0000ff;">&gt;</span></li>
<li>  <span style="color:#0000ff;">&lt;/</span><span style="color:#a31515;">log4net</span><span style="color:#0000ff;">&gt;</span></li>
</ol>
</div>
</div>
<p>3. Code implementation &#8211; in this case I decided to register it in my global container and retrieve it later. You need to call <span style="text-decoration:underline;"><strong>log4net.Config.XmlConfigurator.Configure</strong></span> in order for Log4Net to get the settings from web.config &#8211; This is very important otherwise you will find that there is no log being generated</p>
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Snippet</div>
<div style="background:#ddd;max-height:300px;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;" start="50">
<li><span style="color:#0000ff;">protected</span> <span style="color:#0000ff;">void</span> Application_Start()</li>
<li style="background:#f3f3f3;">        {</li>
<li>            <span style="color:#2b91af;">AreaRegistration</span>.RegisterAllAreas();</li>
<li style="background:#f3f3f3;"></li>
<li>            RegisterGlobalFilters(<span style="color:#2b91af;">GlobalFilters</span>.Filters);</li>
<li style="background:#f3f3f3;">            RegisterRoutes(<span style="color:#2b91af;">RouteTable</span>.Routes);</li>
<li></li>
<li style="background:#f3f3f3;">            <span style="color:#2b91af;">BundleTable</span>.Bundles.RegisterTemplateBundles();</li>
<li>            RegisterDependency();</li>
<li style="background:#f3f3f3;"></li>
<li>        }</li>
<li style="background:#f3f3f3;"></li>
<li>        <span style="color:#0000ff;">#region</span> &#8220;Dependency Injection&#8221;</li>
<li style="background:#f3f3f3;"></li>
<li>        <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">static</span> <span style="color:#2b91af;">Container</span> Container;</li>
<li style="background:#f3f3f3;"></li>
<li>        <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> T GetInstance&lt;T&gt;() <span style="color:#0000ff;">where</span> T : <span style="color:#0000ff;">class</span></li>
<li style="background:#f3f3f3;">        {</li>
<li>            <span style="color:#0000ff;">return</span> Container.GetInstance&lt;T&gt;();</li>
<li style="background:#f3f3f3;">        }</li>
<li></li>
<li style="background:#f3f3f3;">        <span style="color:#0000ff;">protected</span> <span style="color:#0000ff;">void</span> RegisterDependency()</li>
<li>        {</li>
<li style="background:#f3f3f3;">            <span style="color:#008000;">//Create a main containers</span></li>
<li>            <span style="color:#0000ff;">var</span> container = <span style="color:#0000ff;">new</span> <span style="color:#2b91af;">Container</span>();</li>
<li style="background:#f3f3f3;"></li>
<li>            <span style="color:#008000;">// 2. Configure the container (register)</span></li>
<li style="background:#f3f3f3;">            container.RegisterPerWebRequest&lt;<span style="color:#2b91af;">IUnitOfWork</span>&gt;(() =&gt; <span style="color:#0000ff;">new</span> <span style="color:#2b91af;">UnitOfWork</span>(<span style="color:#0000ff;">new</span> <span style="color:#2b91af;">PosDataContext</span>()));</li>
<li></li>
<li style="background:#f3f3f3;">            <span style="color:#008000;">//Register logger</span></li>
<li>            log4net.Config.<span style="color:#2b91af;">XmlConfigurator</span>.Configure();</li>
<li style="background:#f3f3f3;">            container.Register&lt;<span style="color:#2b91af;">ILog</span>&gt;(() =&gt; log4net.<span style="color:#2b91af;">LogManager</span>.GetLogger(<span style="color:#0000ff;">typeof</span>(<span style="color:#2b91af;">MvcApplication</span>)));</li>
<li></li>
<li style="background:#f3f3f3;">            container.Verify();</li>
<li>            Container = container;</li>
<li style="background:#f3f3f3;">        }</li>
<li></li>
<li style="background:#f3f3f3;">        <span style="color:#0000ff;">#endregion</span></li>
</ol>
</div>
</div>
<p><strong> calling the logger from my code (controller in this context) </strong></p>
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Snippet</div>
<div style="background:#ddd;max-height:300px;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;" start="15">
<li><span style="color:#0000ff;">public</span> <span style="color:#2b91af;">ActionResult</span> Index()</li>
<li style="background:#f3f3f3;">        {</li>
<li>            ViewBag.Message = <span style="color:#a31515;">&#8220;Menu&#8221;</span>;</li>
<li style="background:#f3f3f3;"></li>
<li>            <span style="color:#2b91af;">MvcApplication</span>.GetInstance&lt;<span style="color:#2b91af;">ILog</span>&gt;().Info(<span style="color:#a31515;">&#8220;Test Info&#8221;</span>);</li>
<li style="background:#f3f3f3;">            <span style="color:#2b91af;">MvcApplication</span>.GetInstance&lt;<span style="color:#2b91af;">ILog</span>&gt;().Error(<span style="color:#a31515;">&#8220;Test Error&#8221;</span>);</li>
<li>            <span style="color:#2b91af;">MvcApplication</span>.GetInstance&lt;<span style="color:#2b91af;">ILog</span>&gt;().Debug(<span style="color:#a31515;">&#8220;Test Debug&#8221;</span>);</li>
<li style="background:#f3f3f3;"></li>
<li>            <span style="color:#0000ff;">return</span> View();</li>
<li style="background:#f3f3f3;">        }</li>
</ol>
</div>
</div>
<p>PS: if you want to implement your own logger, then I&#8217;d recommend you to have your logger to implement ILog interface and change it through web.config but don&#8217;t wrap/call Log4Net inside your custom logger because you don&#8217;t want to limit the rich functionality of Log4Net with your custom logger</p>
<p>Another tips, is when you started to add logging in your application then there should be some performance overhead eventhough it is minor. In the example below MyFunctionOutput function will still be called eventhough you disabled the logging on the config, in order to make sure the debugging code only executed</p>
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Snippet</div>
<div style="background:#ddd;max-height:300px;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;" start="19">
<li><span style="color:#2b91af;">MvcApplication</span>.GetInstance&lt;<span style="color:#2b91af;">ILog</span>&gt;().Debug(<span style="color:#a31515;">&#8220;My Function Output:&#8221;</span> + MyFunctionOutput());</li>
</ol>
</div>
</div>
<p>When you want to have the debug/logging omitting the log whenever the logging is enabled then you can wrap around the logging with this property (there are another properties IsErrorEnabled, IsInfoEnabled, etc)</p>
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Snippet</div>
<div style="background:#ddd;max-height:300px;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;" start="19">
<li><span style="color:#0000ff;">if</span> (<span style="color:#2b91af;">MvcApplication</span>.GetInstance&lt;<span style="color:#2b91af;">ILog</span>&gt;().IsDebugEnabled)</li>
<li style="background:#f3f3f3;">            {</li>
<li>                <span style="color:#2b91af;">MvcApplication</span>.GetInstance&lt;<span style="color:#2b91af;">ILog</span>&gt;().Debug(<span style="color:#a31515;">&#8220;My Function Output:&#8221;</span> + MyFunctionOutput());</li>
<li style="background:#f3f3f3;">            }</li>
</ol>
</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fransiscuss.wordpress.com/384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fransiscuss.wordpress.com/384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fransiscuss.wordpress.com/384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fransiscuss.wordpress.com/384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fransiscuss.wordpress.com/384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fransiscuss.wordpress.com/384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fransiscuss.wordpress.com/384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fransiscuss.wordpress.com/384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fransiscuss.wordpress.com/384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fransiscuss.wordpress.com/384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fransiscuss.wordpress.com/384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fransiscuss.wordpress.com/384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fransiscuss.wordpress.com/384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fransiscuss.wordpress.com/384/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&#038;blog=26182965&#038;post=384&#038;subd=fransiscuss&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fransiscuss.com/2012/05/16/log4net-logging-for-net/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/70e5c1d49eb30cdc979601f6e85e962a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fransiscuss</media:title>
		</media:content>
	</item>
		<item>
		<title>Pass Model from Javascript to MVC Controller</title>
		<link>http://fransiscuss.com/2012/05/15/pass-model-from-javascript-to-mvc-controller/</link>
		<comments>http://fransiscuss.com/2012/05/15/pass-model-from-javascript-to-mvc-controller/#comments</comments>
		<pubDate>Tue, 15 May 2012 23:34:46 +0000</pubDate>
		<dc:creator>fransiscuss</dc:creator>
				<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://fransiscuss.com/?p=362</guid>
		<description><![CDATA[Initially, I always pass individual object properties through JSON and form the model in the controller as I wasn&#8217;t sure how to pass/form a model from Javascript to controller Controller Code Snippet [AllowAnonymous]         public ActionResult JsonRegister(string username, string password, string confirmpassword,                                             string email, string confirmemail)         {             MemberModel.RegistrationModel model = new MemberModel.RegistrationModel() {                                                                                         UserName = username, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&#038;blog=26182965&#038;post=362&#038;subd=fransiscuss&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Initially, I always pass individual object properties through JSON and form the model in the controller as I wasn&#8217;t sure how to pass/form a model from Javascript to controller</p>
<p><strong>Controller</strong></p>
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Snippet</div>
<div style="background:#ddd;max-height:300px;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 3em;padding:0 0 0 5px;" start="121">
<li>[<span style="color:#2b91af;">AllowAnonymous</span>]</li>
<li style="background:#f3f3f3;">        <span style="color:#0000ff;">public</span> <span style="color:#2b91af;">ActionResult</span> JsonRegister(<span style="color:#0000ff;">string</span> username, <span style="color:#0000ff;">string</span> password, <span style="color:#0000ff;">string</span> confirmpassword,</li>
<li>                                            <span style="color:#0000ff;">string</span> email, <span style="color:#0000ff;">string</span> confirmemail)</li>
<li style="background:#f3f3f3;">        {</li>
<li>            <span style="color:#2b91af;">MemberModel</span>.<span style="color:#2b91af;">RegistrationModel</span> model = <span style="color:#0000ff;">new</span> <span style="color:#2b91af;">MemberModel</span>.<span style="color:#2b91af;">RegistrationModel</span>() {</li>
<li style="background:#f3f3f3;">                                                                                        UserName = username,</li>
<li>                                                                                        Password = password,</li>
<li style="background:#f3f3f3;">                                                                                        ConfirmPassword = confirmpassword,</li>
<li>                                                                                        Email = email,</li>
<li style="background:#f3f3f3;">                                                                                        ConfirmEmail = confirmemail };</li>
</ol>
</div>
</div>
<p><strong>Javascript</strong></p>
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Snippet</div>
<div style="background:#ddd;max-height:300px;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;" start="11">
<li>$.getJSON(<span style="color:#800000;">&#8216;</span><span style="background:#ffff00;color:#800000;">@</span>Url.Action(<span style="color:#a31515;">&#8220;JsonRegister&#8221;</span>)<span style="color:#800000;">&#8216;</span>, { UserName: $(<span style="color:#800000;">&#8220;#UserName&#8221;</span>).val(),</li>
<li style="background:#f3f3f3;">                                                    Password: $(<span style="color:#800000;">&#8220;#Password&#8221;</span>).val(),</li>
<li>                                                    ConfirmPassword: $(<span style="color:#800000;">&#8220;#ConfirmPassword&#8221;</span>).val(),</li>
<li style="background:#f3f3f3;">                                                    Email: $(<span style="color:#800000;">&#8220;#Email&#8221;</span>).val(),</li>
<li>                                                    ConfirmEmail: $(<span style="color:#800000;">&#8220;#ConfirmEmail&#8221;</span>).val()</li>
<li style="background:#f3f3f3;">                                                }, <span style="color:#0000ff;">function</span> (RegisterResult) {</li>
<li>                                                        <span style="color:#0000ff;">if</span> (RegisterResult.success) {</li>
<li style="background:#f3f3f3;">                                                            $(<span style="color:#800000;">&#8216;#RegistrationFields&#8217;</span>).hide();</li>
<li>                                                            $(<span style="color:#800000;">&#8216;#ErrorMessage&#8217;</span>).text(<span style="color:#800000;">&#8221;</span>);</li>
<li style="background:#f3f3f3;">                                                            $(<span style="color:#800000;">&#8216;#RegistrationMessage&#8217;</span>).css(<span style="color:#800000;">&#8216;display&#8217;</span>, <span style="color:#800000;">&#8221;</span>);</li>
<li>                                                        }</li>
<li style="background:#f3f3f3;">                                                        <span style="color:#0000ff;">else</span> {</li>
<li>                                                            $(<span style="color:#800000;">&#8216;#ErrorMessage&#8217;</span>).css(<span style="color:#800000;">&#8216;display&#8217;</span>, <span style="color:#800000;">&#8221;</span>).text(RegisterResult.errors);</li>
<li style="background:#f3f3f3;">                                                        }</li>
<li>        });</li>
</ol>
</div>
</div>
<p>the code above is working just fine but I still feel that there is room for improvement. Below is the code that shows how you can still have your controller accepting the model instead of expanding the properties in the model as the parameters to the controller.<span style="text-decoration:underline;"><em><strong> The solution is just to have the model being assigned to a variable (in this context called as data) before passing it to the JSON, my previous code was forming the actual object in the JSON code</strong></em></span></p>
<p><strong>Controller</strong></p>
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Snippet</div>
<div style="background:#ddd;max-height:300px;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 3em;padding:0 0 0 5px;" start="121">
<li>[<span style="color:#2b91af;">AllowAnonymous</span>]</li>
<li style="background:#f3f3f3;">        <span style="color:#0000ff;">public</span> <span style="color:#2b91af;">ActionResult</span> JsonRegister(<span style="color:#2b91af;">MemberModel</span>.<span style="color:#2b91af;">RegistrationModel</span> model)</li>
<li>        {</li>
<li style="background:#f3f3f3;">            <span style="color:#0000ff;">string</span> error = <span style="color:#0000ff;">string</span>.Empty;</li>
<li></li>
<li style="background:#f3f3f3;">            <span style="color:#0000ff;">if</span> (ModelState.IsValid)</li>
</ol>
</div>
</div>
<p><strong>Javascript</strong></p>
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Snippet</div>
<div style="background:#ddd;max-height:300px;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2.5em;padding:0 0 0 5px;" start="9">
<li><span style="color:#0000ff;">var</span> data = { UserName: $(<span style="color:#800000;">&#8220;#UserName&#8221;</span>).val(),</li>
<li style="background:#f3f3f3;">            Password: $(<span style="color:#800000;">&#8220;#Password&#8221;</span>).val(),</li>
<li>            ConfirmPassword: $(<span style="color:#800000;">&#8220;#ConfirmPassword&#8221;</span>).val(),</li>
<li style="background:#f3f3f3;">            Email: $(<span style="color:#800000;">&#8220;#Email&#8221;</span>).val(),</li>
<li>            ConfirmEmail: $(<span style="color:#800000;">&#8220;#ConfirmEmail&#8221;</span>).val()</li>
<li style="background:#f3f3f3;">        };</li>
<li></li>
<li style="background:#f3f3f3;">        $.getJSON(<span style="color:#800000;">&#8216;</span><span style="background:#ffff00;color:#800000;">@</span>Url.Action(<span style="color:#a31515;">&#8220;JsonRegister&#8221;</span>)<span style="color:#800000;">&#8216;</span>, data, <span style="color:#0000ff;">function</span> (RegisterResult) {</li>
<li>            <span style="color:#0000ff;">if</span> (RegisterResult.success) {</li>
<li style="background:#f3f3f3;">                $(<span style="color:#800000;">&#8216;#RegistrationFields&#8217;</span>).hide();</li>
<li>                $(<span style="color:#800000;">&#8216;#ErrorMessage&#8217;</span>).text(<span style="color:#800000;">&#8221;</span>);</li>
<li style="background:#f3f3f3;">                $(<span style="color:#800000;">&#8216;#RegistrationMessage&#8217;</span>).css(<span style="color:#800000;">&#8216;display&#8217;</span>, <span style="color:#800000;">&#8221;</span>);</li>
<li>            }</li>
<li style="background:#f3f3f3;">            <span style="color:#0000ff;">else</span> {</li>
<li>                $(<span style="color:#800000;">&#8216;#ErrorMessage&#8217;</span>).css(<span style="color:#800000;">&#8216;display&#8217;</span>, <span style="color:#800000;">&#8221;</span>).text(RegisterResult.errors);</li>
<li style="background:#f3f3f3;">            }</li>
<li>        });</li>
</ol>
</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fransiscuss.wordpress.com/362/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fransiscuss.wordpress.com/362/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fransiscuss.wordpress.com/362/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fransiscuss.wordpress.com/362/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fransiscuss.wordpress.com/362/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fransiscuss.wordpress.com/362/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fransiscuss.wordpress.com/362/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fransiscuss.wordpress.com/362/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fransiscuss.wordpress.com/362/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fransiscuss.wordpress.com/362/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fransiscuss.wordpress.com/362/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fransiscuss.wordpress.com/362/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fransiscuss.wordpress.com/362/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fransiscuss.wordpress.com/362/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fransiscuss.com&#038;blog=26182965&#038;post=362&#038;subd=fransiscuss&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fransiscuss.com/2012/05/15/pass-model-from-javascript-to-mvc-controller/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/70e5c1d49eb30cdc979601f6e85e962a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fransiscuss</media:title>
		</media:content>
	</item>
	</channel>
</rss>
