title: Get Controller's Action name in View
body: <p>What is the correct way to get the name of the Action returning the View in MVC3?</p>
  
  <p>I am using <code>ViewContext.Controller.ValueProvider.GetValue("action").RawValue</code> to return the name of the Action (Method), which is creating the View in MVC3. I return this in a Partial View, which is included in the View returned by the Action.</p>
  
  <p>It works fine for Index, but, when I try to use it for another method name, it always evaluates to false.</p>
  
  <p>In the immediate window I get the following results:</p>
  
  <pre><code>ViewContext.Controller.ValueProvider.GetValue("action").RawValue
  "Edit"
  
  ViewContext.Controller.ValueProvider.GetValue("action").RawValue == "Edit"
  false
  </code></pre>
  
  <p>Which is highly confusing, because the first statement evaluates to a string with value "Edit", while comparing this to a string "Edit" returns false?</p>
  
  <p>Bizarre...</p>