<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Updating to ASP.NET MVC 2 Preview 2</title>
	<atom:link href="http://blogs.teamb.com/craigstuntz/2009/10/05/38476/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.teamb.com/craigstuntz/2009/10/05/38476/</link>
	<description>C# • Entity Framework • Functional Programming • MVC • Web</description>
	<pubDate>Sun, 12 Feb 2012 04:14:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Rafiqul Islam</title>
		<link>http://blogs.teamb.com/craigstuntz/2009/10/05/38476/#comment-26522</link>
		<dc:creator>Rafiqul Islam</dc:creator>
		<pubDate>Fri, 08 Apr 2011 06:13:08 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/craigstuntz/?p=38476#comment-26522</guid>
		<description>Hi,
After upgrading from mvc 1 to mvc 2, I am not getting the form data in controller from the view. It's happening only in IE though. Other browswes are fine.
Any thought??

Thanks</description>
		<content:encoded><![CDATA[<p>Hi,<br />
After upgrading from mvc 1 to mvc 2, I am not getting the form data in controller from the view. It&#8217;s happening only in IE though. Other browswes are fine.<br />
Any thought??</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: firefly</title>
		<link>http://blogs.teamb.com/craigstuntz/2009/10/05/38476/#comment-13495</link>
		<dc:creator>firefly</dc:creator>
		<pubDate>Fri, 22 Jan 2010 00:10:50 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/craigstuntz/?p=38476#comment-13495</guid>
		<description>I did look at it but I wasn't sure. Thanks for the verification :)</description>
		<content:encoded><![CDATA[<p>I did look at it but I wasn&#8217;t sure. Thanks for the verification <img src='http://blogs.teamb.com/craigstuntz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: firefly</title>
		<link>http://blogs.teamb.com/craigstuntz/2009/10/05/38476/#comment-13444</link>
		<dc:creator>firefly</dc:creator>
		<pubDate>Tue, 19 Jan 2010 06:59:06 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/craigstuntz/?p=38476#comment-13444</guid>
		<description>Craig,

Just to verify the Json data that you showed on your jqgrid demo is an array right?

&lt;blockquote&gt;&lt;em&gt;&lt;strong&gt;Response:&lt;/strong&gt; No, it's one object which contains an array as a property. Did you look at it?&lt;/em&gt;&lt;/blockquote&gt;

In another word it might be vulnerable to the cross site attack if I leave it as it is?

&lt;blockquote&gt;&lt;em&gt;&lt;strong&gt;Response:&lt;/strong&gt; No, only &lt;code&gt;GET&lt;/code&gt;s which return an array as the "root" object are vulnerable to &lt;a href="http://haacked.com/archive/2009/06/25/json-hijacking.aspx" rel="nofollow"&gt;this kind of attack&lt;/a&gt;.&lt;/em&gt;&lt;/blockquote&gt;</description>
		<content:encoded><![CDATA[<p>Craig,</p>
<p>Just to verify the Json data that you showed on your jqgrid demo is an array right?</p>
<blockquote><p><em><strong>Response:</strong> No, it&#8217;s one object which contains an array as a property. Did you look at it?</em></p></blockquote>
<p>In another word it might be vulnerable to the cross site attack if I leave it as it is?</p>
<blockquote><p><em><strong>Response:</strong> No, only <code>GET</code>s which return an array as the "root" object are vulnerable to <a href="http://haacked.com/archive/2009/06/25/json-hijacking.aspx" rel="nofollow">this kind of attack</a>.</em></p></blockquote>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Norman</title>
		<link>http://blogs.teamb.com/craigstuntz/2009/10/05/38476/#comment-11807</link>
		<dc:creator>Dick Norman</dc:creator>
		<pubDate>Fri, 20 Nov 2009 09:11:29 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/craigstuntz/?p=38476#comment-11807</guid>
		<description>Craig,

Good catch!  Thanks for the help.</description>
		<content:encoded><![CDATA[<p>Craig,</p>
<p>Good catch!  Thanks for the help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craig Stuntz</title>
		<link>http://blogs.teamb.com/craigstuntz/2009/10/05/38476/#comment-11800</link>
		<dc:creator>Craig Stuntz</dc:creator>
		<pubDate>Thu, 19 Nov 2009 22:33:38 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/craigstuntz/?p=38476#comment-11800</guid>
		<description>Dick: Looks to me like you've got two, nested JsonResults there. The second one serialized the first.</description>
		<content:encoded><![CDATA[<p>Dick: Looks to me like you&#8217;ve got two, nested JsonResults there. The second one serialized the first.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Norman</title>
		<link>http://blogs.teamb.com/craigstuntz/2009/10/05/38476/#comment-11799</link>
		<dc:creator>Dick Norman</dc:creator>
		<pubDate>Thu, 19 Nov 2009 22:32:53 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/craigstuntz/?p=38476#comment-11799</guid>
		<description>Craig,

Yet another twist.  The pre-2.0 data looks like this:

{"total":1,"page":1,"records":2,"rows":[{"id":"3","cell":["3","Ajax","Mike","&#160;"]},{"id":"1","cell":["1","Gutierrez","Sandy","&#160;"]}]}

Now jqGrid chokes - presumably because of the ContentEncoding and ContentType, though the JsonRequestBehaviour passed as expected:

{"ContentEncoding":null,"ContentType":null,"Data":{"total":1,"page":1,"records":2,"rows":[{"id":"3","cell"
:["3","Ajax","Mike","&#160;"]},{"id":"1","cell":["1","Gutierrez","Sandy","&#160;"]}]},"JsonRequestBehavior"
:1}</description>
		<content:encoded><![CDATA[<p>Craig,</p>
<p>Yet another twist.  The pre-2.0 data looks like this:</p>
<p>{"total":1,"page":1,"records":2,"rows":[{"id":"3","cell":["3","Ajax","Mike","&nbsp;"]},{"id":"1","cell":["1","Gutierrez","Sandy","&nbsp;"]}]}</p>
<p>Now jqGrid chokes - presumably because of the ContentEncoding and ContentType, though the JsonRequestBehaviour passed as expected:</p>
<p>{"ContentEncoding":null,"ContentType":null,"Data":{"total":1,"page":1,"records":2,"rows":[{"id":"3","cell"<br />
:["3","Ajax","Mike","&nbsp;"]},{"id":"1","cell":["1","Gutierrez","Sandy","&nbsp;"]}]},"JsonRequestBehavior"<br />
:1}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Norman</title>
		<link>http://blogs.teamb.com/craigstuntz/2009/10/05/38476/#comment-11791</link>
		<dc:creator>Dick Norman</dc:creator>
		<pubDate>Thu, 19 Nov 2009 12:31:27 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/craigstuntz/?p=38476#comment-11791</guid>
		<description>Craig,

Thanks for the swift response (another early riser).

I tried something similar the other day w/o success, but maybe I got my hands crossed.  I'll give it a shot.</description>
		<content:encoded><![CDATA[<p>Craig,</p>
<p>Thanks for the swift response (another early riser).</p>
<p>I tried something similar the other day w/o success, but maybe I got my hands crossed.  I&#8217;ll give it a shot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craig Stuntz</title>
		<link>http://blogs.teamb.com/craigstuntz/2009/10/05/38476/#comment-11788</link>
		<dc:creator>Craig Stuntz</dc:creator>
		<pubDate>Thu, 19 Nov 2009 10:38:29 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/craigstuntz/?p=38476#comment-11788</guid>
		<description>Dick: Your ToJsonResult can do something like:

&lt;code&gt;return new JsonResult
            {
                Data = stuff,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            };&lt;/code&gt;

This does work.</description>
		<content:encoded><![CDATA[<p>Dick: Your ToJsonResult can do something like:</p>
<p><code>return new JsonResult<br />
            {<br />
                Data = stuff,<br />
                JsonRequestBehavior = JsonRequestBehavior.AllowGet<br />
            };</code></p>
<p>This does work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Norman</title>
		<link>http://blogs.teamb.com/craigstuntz/2009/10/05/38476/#comment-11777</link>
		<dc:creator>Dick Norman</dc:creator>
		<pubDate>Wed, 18 Nov 2009 23:05:01 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/craigstuntz/?p=38476#comment-11777</guid>
		<description>Craig,

First, Kudos on your blog.  I found it about the first day you started your series on MVC/JSON/JqGrid and you are one of the best of the best. 

The only thing I didn't like about your solution was the label redundancy in JSON:
{"Total":1,"Page":1,"Records":2,"Rows":[{"ID":3,"BC_LASTNAME":"Ajax","BC_FIRSTNAME":"Mike","BC_MIDDLEINITIAL"
:null},{"ID":1,"BC_LASTNAME":"Gutierrez","BC_FIRSTNAME":"Sandy","BC_MIDDLEINITIAL":null}],"UserData"
:null}

I've been very effective with essentially my own formatted  JSON using the following, based upon your original guidance:

JsonResult jres = JsonHelper.ToJsonResult(contacts, totalPages, page, totalRecords, "ID", new string[] { "ID", "BC_LASTNAME", "BC_FIRSTNAME", "BC_MIDDLEINITIAL" });
            return jres;

My solution generates the column names only once and works great.  Then comes MVC 2 with JsonRequestBehavior.AllowGet.  Since it isn't built technically by Json, there doesn't appear to be a way to use the JsonRequestBehavior, yet it still fails with the JsonRequestBehavior error on VS2010. 

I haven't found a way to marry the two approaches.  Any ideas?</description>
		<content:encoded><![CDATA[<p>Craig,</p>
<p>First, Kudos on your blog.  I found it about the first day you started your series on MVC/JSON/JqGrid and you are one of the best of the best. </p>
<p>The only thing I didn&#8217;t like about your solution was the label redundancy in JSON:<br />
{"Total":1,"Page":1,"Records":2,"Rows":[{"ID":3,"BC_LASTNAME":"Ajax","BC_FIRSTNAME":"Mike","BC_MIDDLEINITIAL"<br />
:null},{"ID":1,"BC_LASTNAME":"Gutierrez","BC_FIRSTNAME":"Sandy","BC_MIDDLEINITIAL":null}],"UserData"<br />
:null}</p>
<p>I&#8217;ve been very effective with essentially my own formatted  JSON using the following, based upon your original guidance:</p>
<p>JsonResult jres = JsonHelper.ToJsonResult(contacts, totalPages, page, totalRecords, "ID", new string[] { "ID", "BC_LASTNAME", "BC_FIRSTNAME", "BC_MIDDLEINITIAL" });<br />
            return jres;</p>
<p>My solution generates the column names only once and works great.  Then comes MVC 2 with JsonRequestBehavior.AllowGet.  Since it isn&#8217;t built technically by Json, there doesn&#8217;t appear to be a way to use the JsonRequestBehavior, yet it still fails with the JsonRequestBehavior error on VS2010. </p>
<p>I haven&#8217;t found a way to marry the two approaches.  Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craig Stuntz</title>
		<link>http://blogs.teamb.com/craigstuntz/2009/10/05/38476/#comment-10330</link>
		<dc:creator>Craig Stuntz</dc:creator>
		<pubDate>Thu, 22 Oct 2009 10:02:12 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/craigstuntz/?p=38476#comment-10330</guid>
		<description>David, I've never attempted to use Prism.</description>
		<content:encoded><![CDATA[<p>David, I&#8217;ve never attempted to use Prism.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

