title: get object from controller in view MVC
body: <p>I need to create the body of a email in html format. Inside a HistoryController I define a metod that return an object (Course) which attributes will be used for crate the body as i said. I dont know how to get the object in the View. I've seen a metod using ActionResult but i dont to present the View it just work like an auxiliary for creating the email.</p>
  
  <p>I get this.</p>
  
  <p><strong>HistoryController</strong></p>
  
  <pre><code>public static CURSO courseSelected = new CURSO();
  public static CURSO courseSel()
  {
      courseSelected.Name = "Physics";
      return courseSelected;//cursoSelected del tipo CURSO
  }
  </code></pre>
  
  <p><strong>View</strong></p>
  
  <pre><code>@model Project.Models.Course
  @{ 
      var courseSel = Project.Models.HistoryController.courseSel(); 
  }
  &lt;fieldset class="fHorizontalCenter"&gt;
          &lt;label style="font-size:18px"&gt;Welcome to course of &lt;/label&gt;&lt;label&gt;@courseSel.Name&lt;/label&gt;&lt; br /&gt;
  &lt;/fieldset&gt;
  </code></pre>
  
  <p>But i cant use de data of the variable, It always prints this</p>
  
  <p><strong>Welcome to course of @courseSel.Name</strong></p>