<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ASP.NET MVC</title><link>http://forums.asp.net/1146.aspx</link><description>Discussions regarding Model-View-Controller (MVC) support in ASP.NET.  &lt;a href="http://forums.asp.net/1215.aspx"&gt;T4MVC subforum&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: ActionMethod is gone :(</title><link>http://forums.asp.net/thread/2619676.aspx</link><pubDate>Sat, 13 Sep 2008 16:21:58 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2619676</guid><dc:creator>timtas</dc:creator><author>timtas</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2619676.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2619676</wfw:commentRss><description>&lt;p&gt;Never mind about my question of a better way to do this.&amp;nbsp; I have found it.&amp;nbsp; Actually I had a a filter attribute on the class, SetMainMenu, and a normal attribute on the methods, MenuContext(&amp;quot;Products&amp;quot;).&amp;nbsp; SetMainMenu reflected on the calling method to get the MenuContext attribute and setup the menu correctly.&amp;nbsp; &lt;/p&gt;&lt;p&gt;Now MenuContext is a filter attribute which then comes behind SetMainMenu and disables the the current menu item based on its key.&amp;nbsp; No need for reflection.&amp;nbsp; A better approach.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: ActionMethod is gone :(</title><link>http://forums.asp.net/thread/2619650.aspx</link><pubDate>Sat, 13 Sep 2008 15:42:16 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2619650</guid><dc:creator>timtas</dc:creator><author>timtas</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2619650.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2619650</wfw:commentRss><description>&lt;p&gt;Yesterday I discovered this breaking change.&amp;nbsp; I have made a workaround like so: &lt;/p&gt;&lt;pre class="coloredcode"&gt;var method = filterContext.Controller.GetType()&lt;br /&gt;    .GetMethod(filterContext.RouteData.Values[&lt;span class="st"&gt;&amp;quot;action&amp;quot;&lt;/span&gt;].ToString());&lt;/pre&gt;&lt;p&gt;This feels really yucky and in fact will break if I ever want to use the AcceptVerbs attribute to translate routes into differently named methods.&amp;nbsp; Does anyone know a more sure way to do this?&lt;/p&gt;&lt;p&gt;In case anyone is wondering, &amp;quot;why do you want the method anyway,&amp;quot; I will explain.&amp;nbsp; My site has a main menu and I need to always know which menu item represents the current context.&amp;nbsp; To achieve this I set a filter attribute for each method that identifies its &amp;quot;menu context.&amp;quot;&amp;nbsp; To get the attrubute I need to know the current executing method.&amp;nbsp; Maybe there is some other (better?) way to achieve this?&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: ActionMethod is gone :(</title><link>http://forums.asp.net/thread/2599567.aspx</link><pubDate>Thu, 04 Sep 2008 07:56:53 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2599567</guid><dc:creator>levib</dc:creator><author>levib</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2599567.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2599567</wfw:commentRss><description>&lt;p&gt;The ActionMethod property is gone per the discussion at &lt;a href="http://forums.asp.net/p/1301069/2538397.aspx"&gt;http://forums.asp.net/p/1301069/2538397.aspx&lt;/a&gt;.&amp;nbsp; If you need to access the controller name or the action name &lt;strong&gt;&lt;em&gt;and you&amp;#39;re using standard MVC naming conventions for routes&lt;/em&gt;&lt;/strong&gt;, you can access them from the filter context via RouteData.Values[&amp;quot;controller&amp;quot;] and RouteData.Values[&amp;quot;action&amp;quot;].&lt;/p&gt;</description></item><item><title>Re: ActionMethod is gone :(</title><link>http://forums.asp.net/thread/2598889.aspx</link><pubDate>Thu, 04 Sep 2008 00:39:33 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2598889</guid><dc:creator>flukus</dc:creator><author>flukus</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2598889.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2598889</wfw:commentRss><description>I&amp;#39;me having this problem to. I need to filter on ActionMethod.Name and can&amp;#39;t see a way to do it in preview 5.</description></item><item><title>ActionMethod is gone :(</title><link>http://forums.asp.net/thread/2598879.aspx</link><pubDate>Thu, 04 Sep 2008 00:21:32 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2598879</guid><dc:creator>bulgarian388</dc:creator><author>bulgarian388</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2598879.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2598879</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;So, I just upgraded to preview 5, and now my filters are broken... One of my filters makes sure that the url contains &amp;quot;www&amp;quot; (for search engine consistency) and it uses the ActionMethod.Name property to make sure its redirecting to the proper action. Alas, the ActionMethod is now gone, so I don&amp;#39;t know what I should use to find out what action was being accessed, or if it&amp;#39;s even possible...&lt;/p&gt;&lt;p&gt;If anyone has any ideas, I would appreciate them.&lt;/p&gt;&lt;p&gt;Thanks in advance! &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>