title: ASP.NET MVC redirect to login page on ajax content call
body: <p>If I try to get a partial control via ajax call, and the session has expired, or the user is not authenticated. The server renders the whole site again with the login and master page, new css, etc and sends it back to jquery.</p>
  
  <p>Is there a way to have jquery or mvc know its an ajax call and just return a string or something? I use the attribute tags such as:</p>
  
  <pre><code>public class TheController{
     [Authorize]
     public ActionResult GetProfileInfo(){
            return PartialView("ProfileControl");
     }
  }
  </code></pre>