title: Page.Request on asp.net mvc?
body: <p>I was trying to execute this code, except the page_load</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e) 
  { 
      var contextToken = TokenHelper.GetContextTokenFromRequest(Page.Request); 
  </code></pre>
  
  <p>in a controller</p>
  
  <pre><code>var contextToken = TokenHelper.GetContextTokenFromRequest(Page.Request);
  </code></pre>
  
  <p>However I get this error</p>
  
  <blockquote>
    <p>Error  1   An object reference is required for the non-static field, method, or property 'System.Web.UI.Page.Request.get'</p>
  </blockquote>
  
  <p>How can I get the current page request in MVC?</p>
  
  <p>Update 1:</p>
  
  <p>I changed to:</p>
  
  <pre><code> var contextToken = TokenHelper.GetContextTokenFromRequest(HttpContext.Current.Request);
  </code></pre>
  
  <p>Now I got:</p>
  
  <blockquote>
    <p>Error 2   'System.Web.HttpContextBase' does not contain a definition for
    'Current' and no extension method 'Current' accepting a first argument
    of type 'System.Web.HttpContextBase' could be found (are you missing a
    using directive or an assembly reference?)</p>
  </blockquote>
  
  <p>What assembly do I need?</p>
  
  <p>These are my usings</p>
  
  <pre><code>using Microsoft.SharePoint.Client;
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.Mvc;
  using System.Web.UI;
  </code></pre>