<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Rendering and Binding Drop Down Lists using ASP.NET MVC 2 EditorFor</title>
	<atom:link href="http://www.nickriggs.com/posts/rendering-and-binding-drop-down-lists-using-asp-net-mvc-2-editorfor/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nickriggs.com/posts/rendering-and-binding-drop-down-lists-using-asp-net-mvc-2-editorfor/</link>
	<description>Making stuff up about web development since last week.</description>
	<lastBuildDate>Wed, 01 Sep 2010 20:57:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Nick Riggs</title>
		<link>http://www.nickriggs.com/posts/rendering-and-binding-drop-down-lists-using-asp-net-mvc-2-editorfor/comment-page-1/#comment-939</link>
		<dc:creator>Nick Riggs</dc:creator>
		<pubDate>Mon, 16 Aug 2010 19:51:58 +0000</pubDate>
		<guid isPermaLink="false">http://nickriggs.com/?p=168#comment-939</guid>
		<description>I welcome feedback to anything I post - as long as it’s constructive and polite. However, your post is neither. 

Anti-Constructive: Here is a concept. Start a dialog about a different approach instead of just shooting off at the mouth. For example, when you say something like “which is just a no go in 99% of cases”. Perhaps you could explain why. That would make it a constructive comment and we could have one of those dialog things. Who knows – you could change my mind and I could update this 9 month old post. 

Anti-Polite: “completely USELESS” and “I really feel you made me waste my time”. Really? Do you think I get paid to share this stuff? I do it because I hope I can help folks the same way countless other blogs and open source projects have helped me. I’m well aware that I don’t bat 1.00. I would love to read your blog or see your open source commits. I really would – send me a link… but we both know that isn’t going to happen. You didn’t even have the guts to leave your real name or email on a flame comment. 

So, even though I would usually delete a comment like yours. I’m going to leave it. I think it’s important that others know exactly how not to leave a comment on a blog.</description>
		<content:encoded><![CDATA[<p>I welcome feedback to anything I post &#8211; as long as it’s constructive and polite. However, your post is neither. </p>
<p>Anti-Constructive: Here is a concept. Start a dialog about a different approach instead of just shooting off at the mouth. For example, when you say something like “which is just a no go in 99% of cases”. Perhaps you could explain why. That would make it a constructive comment and we could have one of those dialog things. Who knows – you could change my mind and I could update this 9 month old post. </p>
<p>Anti-Polite: “completely USELESS” and “I really feel you made me waste my time”. Really? Do you think I get paid to share this stuff? I do it because I hope I can help folks the same way countless other blogs and open source projects have helped me. I’m well aware that I don’t bat 1.00. I would love to read your blog or see your open source commits. I really would – send me a link… but we both know that isn’t going to happen. You didn’t even have the guts to leave your real name or email on a flame comment. </p>
<p>So, even though I would usually delete a comment like yours. I’m going to leave it. I think it’s important that others know exactly how not to leave a comment on a blog.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The angry guy</title>
		<link>http://www.nickriggs.com/posts/rendering-and-binding-drop-down-lists-using-asp-net-mvc-2-editorfor/comment-page-1/#comment-936</link>
		<dc:creator>The angry guy</dc:creator>
		<pubDate>Mon, 16 Aug 2010 15:15:33 +0000</pubDate>
		<guid isPermaLink="false">http://nickriggs.com/?p=168#comment-936</guid>
		<description>I&#039;ve been working on your solution for three hours now, until I realized it&#039;s completely USELESS.

You&#039;re filling the ViewModel Movies property the hard way through the constructor, which is just a no go in 99% of cases.

DropDownList values are normally filled from a DataSource that the ViewModel should not be aware of.

So when you submit the form, there&#039;s just no SelectListItem values to be selected from. It&#039;s either null or Count == 0 depending where you try to override the DefaultModelBinder.

I really feel you made me waste my time...</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been working on your solution for three hours now, until I realized it&#8217;s completely USELESS.</p>
<p>You&#8217;re filling the ViewModel Movies property the hard way through the constructor, which is just a no go in 99% of cases.</p>
<p>DropDownList values are normally filled from a DataSource that the ViewModel should not be aware of.</p>
<p>So when you submit the form, there&#8217;s just no SelectListItem values to be selected from. It&#8217;s either null or Count == 0 depending where you try to override the DefaultModelBinder.</p>
<p>I really feel you made me waste my time&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sshabdali</title>
		<link>http://www.nickriggs.com/posts/rendering-and-binding-drop-down-lists-using-asp-net-mvc-2-editorfor/comment-page-1/#comment-890</link>
		<dc:creator>sshabdali</dc:creator>
		<pubDate>Tue, 10 Aug 2010 07:57:09 +0000</pubDate>
		<guid isPermaLink="false">http://nickriggs.com/?p=168#comment-890</guid>
		<description>If i use EditorForModel() rather then EditorFor(m =&gt; m) no dropdown list appears.

any idea why?</description>
		<content:encoded><![CDATA[<p>If i use EditorForModel() rather then EditorFor(m =&gt; m) no dropdown list appears.</p>
<p>any idea why?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Riggs</title>
		<link>http://www.nickriggs.com/posts/rendering-and-binding-drop-down-lists-using-asp-net-mvc-2-editorfor/comment-page-1/#comment-233</link>
		<dc:creator>Nick Riggs</dc:creator>
		<pubDate>Sat, 17 Apr 2010 14:27:07 +0000</pubDate>
		<guid isPermaLink="false">http://nickriggs.com/?p=168#comment-233</guid>
		<description>That’s a pretty interesting scenario. When you say “depending what has been passed in”, is it something in the Route or Request data? If it is, you could potential create a custom model binder for your type that that identifies and initializes the encapsulated list when the model is first instantiated.</description>
		<content:encoded><![CDATA[<p>That’s a pretty interesting scenario. When you say “depending what has been passed in”, is it something in the Route or Request data? If it is, you could potential create a custom model binder for your type that that identifies and initializes the encapsulated list when the model is first instantiated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Styles</title>
		<link>http://www.nickriggs.com/posts/rendering-and-binding-drop-down-lists-using-asp-net-mvc-2-editorfor/comment-page-1/#comment-232</link>
		<dc:creator>Tom Styles</dc:creator>
		<pubDate>Thu, 15 Apr 2010 14:48:24 +0000</pubDate>
		<guid isPermaLink="false">http://nickriggs.com/?p=168#comment-232</guid>
		<description>Nick,

Thanks for the tutorial.

In your example you are using an unchanging list of movies. I have a case where the class has a different set of SelectListItems in it depending on what has been passed in. This means that you can&#039;t use your model binder to find the selected value because the collection of selectlistitems is blank.

Can you think of a good way to solve this issue. I&#039;ve had to go back to using the old ways for the time being but I&#039;m keen on coming up with a good solution for using these new techniques when possible.</description>
		<content:encoded><![CDATA[<p>Nick,</p>
<p>Thanks for the tutorial.</p>
<p>In your example you are using an unchanging list of movies. I have a case where the class has a different set of SelectListItems in it depending on what has been passed in. This means that you can&#8217;t use your model binder to find the selected value because the collection of selectlistitems is blank.</p>
<p>Can you think of a good way to solve this issue. I&#8217;ve had to go back to using the old ways for the time being but I&#8217;m keen on coming up with a good solution for using these new techniques when possible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Riggs</title>
		<link>http://www.nickriggs.com/posts/rendering-and-binding-drop-down-lists-using-asp-net-mvc-2-editorfor/comment-page-1/#comment-230</link>
		<dc:creator>Nick Riggs</dc:creator>
		<pubDate>Mon, 01 Mar 2010 19:56:40 +0000</pubDate>
		<guid isPermaLink="false">http://nickriggs.com/?p=168#comment-230</guid>
		<description>@Dave. I use the Required attribute the same way I would on any other property in my view model:

[code lang=&quot;csharp&quot;]
[Required]
[UIHint(&quot;List&quot;)]
public IEnumerable&lt;SelectListItem&gt; Movies { get; private set; }
[/code]

Just make sure that the default &quot;not-selected&quot; option in the list has a value of &quot;&quot;.</description>
		<content:encoded><![CDATA[<p>@Dave. I use the Required attribute the same way I would on any other property in my view model:</p>
<pre class="brush: csharp;">
[Required]
[UIHint(&quot;List&quot;)]
public IEnumerable&lt;SelectListItem&gt; Movies { get; private set; }
</pre>
<p>Just make sure that the default &#8220;not-selected&#8221; option in the list has a value of &#8220;&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://www.nickriggs.com/posts/rendering-and-binding-drop-down-lists-using-asp-net-mvc-2-editorfor/comment-page-1/#comment-229</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Sat, 27 Feb 2010 20:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://nickriggs.com/?p=168#comment-229</guid>
		<description>Any idea how you could add the Required attribute to your view model?</description>
		<content:encoded><![CDATA[<p>Any idea how you could add the Required attribute to your view model?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rendering and Binding Drop Down Lists using ASP.NET MVC 2 &#8230; &#171; 01Scripts.co.cc</title>
		<link>http://www.nickriggs.com/posts/rendering-and-binding-drop-down-lists-using-asp-net-mvc-2-editorfor/comment-page-1/#comment-228</link>
		<dc:creator>Rendering and Binding Drop Down Lists using ASP.NET MVC 2 &#8230; &#171; 01Scripts.co.cc</dc:creator>
		<pubDate>Thu, 11 Feb 2010 18:55:30 +0000</pubDate>
		<guid isPermaLink="false">http://nickriggs.com/?p=168#comment-228</guid>
		<description>[...] View post: Rendering and Binding Drop Down Lists using ASP.NET MVC 2 &#8230; [...]</description>
		<content:encoded><![CDATA[<p>[...] View post: Rendering and Binding Drop Down Lists using ASP.NET MVC 2 &#8230; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Riggs</title>
		<link>http://www.nickriggs.com/posts/rendering-and-binding-drop-down-lists-using-asp-net-mvc-2-editorfor/comment-page-1/#comment-227</link>
		<dc:creator>Nick Riggs</dc:creator>
		<pubDate>Wed, 27 Jan 2010 21:42:11 +0000</pubDate>
		<guid isPermaLink="false">http://nickriggs.com/?p=168#comment-227</guid>
		<description>@WaywardMage Agreed.</description>
		<content:encoded><![CDATA[<p>@WaywardMage Agreed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WaywardMage</title>
		<link>http://www.nickriggs.com/posts/rendering-and-binding-drop-down-lists-using-asp-net-mvc-2-editorfor/comment-page-1/#comment-226</link>
		<dc:creator>WaywardMage</dc:creator>
		<pubDate>Tue, 26 Jan 2010 19:08:09 +0000</pubDate>
		<guid isPermaLink="false">http://nickriggs.com/?p=168#comment-226</guid>
		<description>Seems like the sort of think that should be built in already.</description>
		<content:encoded><![CDATA[<p>Seems like the sort of think that should be built in already.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
