title: MVC: Access data attributes in controller
body: <p>Might be a asked and answered...sorry but, I've been searching for a while.</p>
  
  <p>RAZOR VIEW</p>
  
  <pre><code>@foreach (var item in Model.LanguageList)
  {
      &lt;li&gt;
      &lt;a href="@Url.Action("ChangeLanguage", "UserHeader")"  data_languageID="@item.LanguageID" data_someval="hello" data_somevalb="world"&gt;
         &lt;div class="flag @item.LanguageFlag"&gt;
         &lt;/div&gt;
         &lt;div class="flag-title"&gt; @item.LanguageName&lt;/div&gt;
      &lt;/a&gt;
      &lt;/li&gt;
  }
  </code></pre>
  
  <p>How do I access the data attributes in my controller?</p>
  
  <p>CONTROLLER</p>
  
  <pre><code>    public ActionResult ChangeLanguage()
      {
          var x =  ControllerContext; //// ??? get the collection of [data-xx] from where?
  
          return RedirectToAction("Buttons", "Designer");
      }
  </code></pre>