title: How can call model in layout in mvc 4 razor
body: <p>I want to call model in layout for use a validation in empty text field for return a error to gust user if any fields are empty. i have a code layout</p>
  
  <pre><code>@using (Html.BeginForm("Sending", "Home"))
  {
   &lt;form method="post" id="contactfrm" role="form"&gt;
     &lt;div class="col-sm-4"&gt;
       &lt;div class="form-group"&gt;
         &lt;label for="name"&gt;Name&lt;/label&gt;
           @Html.TextBoxFor("Name", null, new { id = "name", @class = "form-control", placeholder = "Enter name", title = "Please enter your name (at least 2 characters)" })
  @Html.ValidationMessageFor(model =&gt; model.Name)
         &lt;/div&gt;
         &lt;div class="form-group"&gt;
         &lt;label for="email"&gt;Email&lt;/label&gt;
         @Html.TextBoxFor("Email", null, new { id = "email", @class = "form-control", placeholder = "Enter email", title = "Please enter a valid email address)" })
         @Html.ValidationMessageFor(model =&gt; model.Email)
         &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="col-sm-4"&gt;
  &lt;div class="form-group"&gt;
  &lt;label for="comments"&gt;Comments&lt;/label&gt;
   @Html.TextArea("Comment", null, new { id = "comments", @class = "form-control", TextMode = "MultiLine", Columns = "3", Rows = "5", placeholder = "Write you message here...", title = "Please enter your message (at least 10 characters)", Style = "resize:none" })
  @Html.ValidationMessageFor(model =&gt; model.Comment)
  &lt;/div&gt;
    &lt;button name="submit" type="submit" class="btn btn-lg btn-primary" id="submit"&gt;Send Your Message&lt;/button&gt;
       &lt;div class="result"&gt;&lt;/div&gt;
       &lt;/div&gt;
       &lt;/form&gt;
  }
  </code></pre>
  
  <p>i want to call sending.cs model for use in @Html.ValidationMessageFor(model => model.Name)</p>
  
  <p>How can i call Model in layout?</p>
  
  <p>Thank you</p>