title: MVC 3 C# :: Retain Form values after Submitting form
body: <p>HI i am facing one problem in development.</p>
  
  <p>I just want to retain my form data after submitting my form with httppost method in MVC3</p>
  
  <p>I don't want to redirect anywhere after post, on the same form i want my submitted values back  in all fields</p>
  
  <p>Any sugestions?</p>
  
  <p>I am doing processing in following method</p>
  
  <pre><code>  [AcceptVerbs(HttpVerbs.Post), ValidateInput(false)]
      public ActionResult PostJobAction(FormCollection PostJobForm, HttpPostedFileBase uploadfile, JobsDetailModel objLocationModel)
      {
          bool blnSavedResume = false;
         // JobsBusinessComponent objJobsBusinessComponent = new JobsBusinessComponent();
          JobsClient objJobsBusinessComponent = new JobsClient();
          UserModel objUserModel = null;
        //  byte[] bytArrayResume = null;
          string strlogoImageName = string.Empty;
          if (uploadfile != null) //if (uploadfile != null &amp;&amp; uploadfile.ContentLength &gt; 1024)
          {
              string UserFolderName = ConfigurationManager.AppSettings["LogoPath"].ToString() + objLocationModel.InstituteName.Trim();
  
              if (!Directory.Exists(UserFolderName))
              {
                  Directory.CreateDirectory(UserFolderName);
              }
  
              strlogoImageName = Guid.NewGuid().ToString() + "_" + uploadfile.FileName;
              blnSavedResume = Utility.ResizeStream(Convert.ToInt16(ConfigurationManager.AppSettings["LogoSize"]), uploadfile.InputStream, UserFolderName + @"\" + strlogoImageName);
              //using (MemoryStream ms = new MemoryStream())
              //{
              //    var filePath = System.IO.Path.GetFileName(uploadfile.FileName);
              //    Image image = Utility.ScaleBySize(Image.FromFile(uploadfile.FileName, true), 200);
              //    uploadfile.InputStream.CopyTo(ms);
              //    bytArrayResume = ms.GetBuffer();
              //}
              ////  byte[] bytArrayResume = uploadfile.InputStream.
  
  
              //blnSavedResume = objJobsBusinessComponent.SaveResumeOnDisk(UserFolderName, uploadfile.FileName, bytArrayResume);
          }
          if (blnSavedResume)
          {
              objUserModel = Utility.GetGuestUserData(); ;
              //objLocationModel.StateID = objUserModel.StateID;
              objLocationModel.CountryID = objUserModel.CountryID;
              objLocationModel.LogoFileName = strlogoImageName;
              objJobsBusinessComponent.PostJob(objLocationModel, 4);
          }
          TempData["Message"] = "Success";
          //return RedirectToAction("Index");
          if (ModelState.IsValid)
          {
              return View(objLocationModel);
          }
          else
          {
              // Dropdown selected values  needs to be repopulated here , if there   error in the model.
              return View(objLocationModel);
          }
          //  return View("~/Views/Employer/PostJob.cshtml");
      }
  </code></pre>
  
  <p>This is the RAZOR Code. Suggest me if i am doing wrong, because i am totally new to MVC.</p>
  
  <pre><code>@using (Html.BeginForm("PostJobAction", "PostJob", FormMethod.Post, new { enctype = "multipart/form-data", id = "PostJobForm", objPostJobModel = Model }))
  {
  
  &lt;div class="post_job" align="center" style="margin-left: 1px"&gt;
      &lt;div id="tabs_container"&gt;
          &lt;div class="my_profile_header"&gt;
              &lt;img src="images/high_school.png" width="21" height="20" hspace="5" vspace="3" align="left" /&gt;&lt;strong&gt;Post
                  Job&lt;/strong&gt;
              &lt;label style="float: right; color: Red; font-family: Calibri; font-style: italic;
                  margin-top: 10px"&gt;
                  Fields marked with '*' are mandatory&lt;/label&gt;
          &lt;/div&gt;
          &lt;div class="my_profile" id="InstituteDetail" style="display: block;"&gt;
              &lt;div class="header_title_form"&gt;
                  &lt;img src="images/photo.png" width="24" height="24" hspace="5" vspace="2" align="left" /&gt;&lt;div
                      align="left" style="vertical-align: middle; margin-left: 40px; margin-top: 3px;
                      font-weight: normal;"&gt;
                      Institute Detail&lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="my_profile_container" align="center" style="background: none"&gt;
              &lt;div class="clear"&gt;
              &lt;/div&gt;
              &lt;div class="emolyer_box"&gt;
                  &lt;div align="center" class="mailbox"&gt;
                      &lt;table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"&gt;
                          &lt;tr&gt;
                              &lt;td height="30" align="left"&gt;
                                  @Html.Label("Institute Type:")&lt;label style="color: Red"&gt;*&lt;/label&gt;
                              &lt;/td&gt;
                              &lt;td width="319" height="30" align="left"&gt;
                                  @Html.DropDownListFor(x =&gt; x.InstituteType, (SelectList)ViewBag.InstituteType, "--Please Select Institute Type--", new { @class = "select", id = "ddlInstituteType", name = "InstituteType" })
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td colspan="2"&gt;
                                  &amp;nbsp;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td height="30" align="left" valign="middle"&gt;
                                  @Html.Label("Institute Category:")&lt;label style="color: Red"&gt;*&lt;/label&gt;
                              &lt;/td&gt;
                              &lt;td width="319" height="30" align="left" valign="middle"&gt;
                                  &lt;select name="InstituteCategory" id="ddlInstituteCategory" class="select" disabled="disabled"&gt;
                                  &lt;/select&gt;
                                  &lt;img id="LoadingImage" style="width: 30px; height: 30px; vertical-align: middle;
                                      visibility: hidden" src="../../Content/images/LoadingImage.gif" alt="Loading.." /&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td colspan="2"&gt;
                                  &amp;nbsp;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td height="30" align="left"&gt;
                                  @Html.Label("Institute Name:")&lt;label style="color: Red"&gt;*&lt;/label&gt;
                              &lt;/td&gt;
                              &lt;td width="319" height="30" align="left" valign="middle"&gt;
                                  @Html.TextBoxFor(x =&gt; x.InstituteName, new { id = "txtInstituteName", Name = "InstituteName", @class = "input" })
                                  &lt;a style="text-decoration: none; color: Gray; cursor: default;" title="Subscription required for this feature"&gt;
                                      &lt;u&gt;Add More&lt;/u&gt;&lt;/a&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td colspan="2"&gt;
                                  &amp;nbsp;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td height="30" align="left"&gt;
                                  @Html.Label("Zip Code:")
                              &lt;/td&gt;
                              &lt;td width="319" height="30" align="left" valign="middle"&gt;
                                  @Html.TextBoxFor(x =&gt; x.InstituteName, new { id = "txtZipCode", Name = "ZipCode", @class = "input" })
                              &lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/table&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="emolyer_box"&gt;
                  &lt;div align="left" class="mailbox"&gt;
                      &lt;table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"&gt;
                          &lt;tr&gt;
                              &lt;td height="30" align="left"&gt;
                                  @Html.Label("Institute State:")&lt;label style="color: Red"&gt;*&lt;/label&gt;
                              &lt;/td&gt;
                              &lt;td width="319" height="30" align="left" valign="middle"&gt;
                                  @Html.DropDownListFor(x =&gt; x.StateID, (SelectList)ViewBag.StateList, "---Please Select State---", new { @class = "select", ID = "ddlState", Name = "StateID" })
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td colspan="2"&gt;
                                  &amp;nbsp;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td height="30" align="left" valign="middle"&gt;
                                  @Html.Label("Institute City:")&lt;label style="color: Red"&gt;*&lt;/label&gt;
                              &lt;/td&gt;
                              &lt;td width="319" height="30" align="left" valign="middle"&gt;
                                  &lt;select name="CityID" id="ddlCity" class="select" runat="server"&gt;
                                  &lt;/select&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td colspan="2"&gt;
                                  &amp;nbsp;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td height="30" align="left"&gt;
                                  @Html.Label("Institute Address:")
                              &lt;/td&gt;
                              &lt;td width="319" height="30" align="left" valign="middle"&gt;
                                  @Html.TextAreaFor(x =&gt; x.InstituteAddress, new { @class = "input", id = "txtInstituteAddress", style = "height:60px" })
                              &lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/table&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="clear"&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;!-- End of Institute Div --&gt;
          &lt;div class="my_profile" id="JobDetail" style="display: block"&gt;
              &lt;div class="header_title_form"&gt;
                  &lt;img src="images/photo.png" width="24" height="24" hspace="5" vspace="2" align="left" /&gt;&lt;div
                      align="left" style="vertical-align: middle; margin-left: 40px; margin-top: 3px;
                      font-weight: normal"&gt;
                      Job Detail&lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="my_profile_container" align="center"&gt;
              &lt;div class="clear"&gt;
              &lt;/div&gt;
              &lt;div class="emolyer_box"&gt;
                  &lt;div align="center" class="mailbox"&gt;
                      &lt;table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"&gt;
                          &lt;tr&gt;
                              &lt;td height="30" align="left"&gt;
                                  @Html.Label("Job Title:")&lt;label style="color: Red"&gt;*&lt;/label&gt;
                              &lt;/td&gt;
                              &lt;td width="319" height="30" align="left" valign="middle"&gt;
                                  @Html.TextBoxFor(x =&gt; x.JobTitle, new { id = "txtJobTitle", Name = "JobTitle", @class = "input" })
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td colspan="2"&gt;
                                  &amp;nbsp;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td height="30" align="left" valign="middle"&gt;
                                  @Html.Label("Role:")
                              &lt;/td&gt;
                              &lt;td width="319" height="30" align="left" valign="middle"&gt;
                                  @Html.DropDownListFor(x =&gt; x.RoleID, (SelectList)ViewBag.RoleList, "---Please Select Role---", new { @class = "select", ID = "ddlRole" })
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td colspan="2"&gt;
                                  &amp;nbsp;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td height="30" align="left"&gt;
                                  @Html.Label("Subject:")
                              &lt;/td&gt;
                              &lt;td width="319" height="30" align="left" valign="middle"&gt;
                                  @Html.DropDownListFor(x =&gt; x.SubjectID, (SelectList)ViewBag.SubjectList, "---Please Select Subject---", new { @class = "select", ID = "ddlSubject" })
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td colspan="2"&gt;
                                  &amp;nbsp;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td height="30" align="left"&gt;
                                  @Html.Label("Qualification:")
                              &lt;/td&gt;
                              &lt;td width="319" height="30" align="left" valign="middle"&gt;
                                  @Html.DropDownListFor(x =&gt; x.QualificationID, (SelectList)ViewBag.QualificationList, "---Please Select Qualification---", new { @class = "select", ID = "ddlQualification" })
                              &lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/table&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="emolyer_box"&gt;
                  &lt;div align="left" class="mailbox"&gt;
                      &lt;table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"&gt;
                          &lt;tr&gt;
                              &lt;td height="30" align="left"&gt;
                                  @Html.Label("Job Type:")
                              &lt;/td&gt;
                              &lt;td width="319" height="30" align="left" valign="middle"&gt;
                                  @Html.DropDownListFor(x =&gt; x.JobType, (SelectList)ViewBag.JobTypeList, "---Please Select Job Type---", new { @class = "select", ID = "ddlJobType" })
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td colspan="2"&gt;
                                  &amp;nbsp;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td height="30" align="left" valign="middle"&gt;
                                  @Html.Label("Experience:")
                              &lt;/td&gt;
                              &lt;td width="319" height="30" align="left" valign="middle"&gt;
                                  &lt;div class="clear"&gt;
                                  &lt;/div&gt;
                                  &lt;div style="text-align: left"&gt;
                                      &lt;select name="MinExperience" id="MinExperienceDropDown" style="width: 32%" class="select"&gt;
                                          &lt;option value=""&gt;--Minimum--&lt;/option&gt;
                                          &lt;option value="0"&gt;0&lt;/option&gt;
                                          &lt;option value="1"&gt;1&lt;/option&gt;
                                          &lt;option value="2"&gt;2&lt;/option&gt;
                                          &lt;option value="3"&gt;3&lt;/option&gt;
                                          &lt;option value="4"&gt;4&lt;/option&gt;
                                          &lt;option value="5"&gt;5&lt;/option&gt;
                                      &lt;/select&gt;
                                      &lt;select name="MaxExperience" id="MaxExperienceDropDown" style="width: 32%; float: right;
                                          margin-right: 82px" class="select"&gt;
                                          &lt;option value=""&gt;--Maximum--&lt;/option&gt;
                                          &lt;option value="0"&gt;0&lt;/option&gt;
                                          &lt;option value="1"&gt;1&lt;/option&gt;
                                          &lt;option value="2"&gt;2&lt;/option&gt;
                                          &lt;option value="3"&gt;3&lt;/option&gt;
                                          &lt;option value="4"&gt;4&lt;/option&gt;
                                          &lt;option value="5"&gt;5&lt;/option&gt;
                                      &lt;/select&gt;
                                  &lt;/div&gt;
                                  &lt;div class="clear"&gt;
                                  &lt;/div&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td colspan="2"&gt;
                                  &amp;nbsp;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td height="30" align="left"&gt;
                                  @Html.Label("Salary:")
                              &lt;/td&gt;
                              &lt;td width="319" height="30" align="left" valign="middle"&gt;
                                  &lt;div class="clear"&gt;
                                  &lt;/div&gt;
                                  &lt;div style="text-align: left"&gt;
                                      &lt;select name="MinSalary" id="MinSalaryDropDown" style="width: 32%" class="select"&gt;
                                          &lt;option value=""&gt;--Minimum--&lt;/option&gt;
                                          &lt;option value="0"&gt;0&lt;/option&gt;
                                          &lt;option value="1000"&gt;1000&lt;/option&gt;
                                          &lt;option value="2000"&gt;2000&lt;/option&gt;
                                          &lt;option value="3000"&gt;3000&lt;/option&gt;
                                          &lt;option value="4000"&gt;4000&lt;/option&gt;
                                          &lt;option value="5000"&gt;50000&lt;/option&gt;
                                      &lt;/select&gt;
                                      &lt;select name="MaxSalary" id="MaxSalaryDropDown" style="width: 32%; float: right;
                                          margin-right: 82px" class="select"&gt;
                                          &lt;option value=""&gt;--Maximum--&lt;/option&gt;
                                          &lt;option value="0"&gt;0&lt;/option&gt;
                                          &lt;option value="1000"&gt;1000&lt;/option&gt;
                                          &lt;option value="2000"&gt;2000&lt;/option&gt;
                                          &lt;option value="3000"&gt;3000&lt;/option&gt;
                                          &lt;option value="4000"&gt;4000&lt;/option&gt;
                                          &lt;option value="5000"&gt;5000&lt;/option&gt;
                                      &lt;/select&gt;
                                  &lt;/div&gt;
                                  &lt;div class="clear"&gt;
                                  &lt;/div&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td colspan="2"&gt;
                                  &amp;nbsp;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td height="30" align="left"&gt;
                                  @Html.Label("No Of Position:")
                              &lt;/td&gt;
                              &lt;td width="319" height="30" align="left" valign="middle"&gt;
                                  @Html.TextBoxFor(x =&gt; x.NoOfPosition, new { id = "txtNoOfPosition", Name = "NoOfPosition", @class = "input" })
                              &lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/table&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="clear"&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;!-- End of Job Detail Div --&gt;
          &lt;div class="my_profile" id="JobDescription" style="display: block"&gt;
              &lt;div class="header_title_form"&gt;
                  &lt;img src="images/photo.png" width="24" height="24" hspace="5" vspace="2" align="left" /&gt;&lt;div
                      align="left" style="vertical-align: middle; margin-left: 40px; margin-top: 3px;
                      font-weight: normal"&gt;
                      Job Description&lt;label style="color: Red"&gt;*&lt;/label&gt;&lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="my_profile_container" align="center"&gt;
              &lt;div class="clear"&gt;
              &lt;/div&gt;
              &lt;div class="emolyer_box"&gt;
                  &lt;div align="center" class="mailbox"&gt;
                      &lt;table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"&gt;
                          &lt;tr&gt;
                              &lt;td height="30" align="left" id="HtmlEditor"&gt;
                                  @Html.TextAreaFor(x =&gt; x.JobDescriptionText, new { name = "inputHtmlEditor", id = "JobDescriptionText", rows = "5", })
                                  @*&lt;textarea id="inputHtmlEditor" name="inputHtmlEditor" rows="5"&gt;&lt;/textarea&gt;*@
                              &lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/table&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="clear"&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="my_profile" id="ContactInfo" style="display: block"&gt;
              &lt;div class="header_title_form"&gt;
                  &lt;img src="images/photo.png" width="24" height="24" hspace="5" vspace="2" align="left" /&gt;&lt;div
                      align="left" style="vertical-align: middle; margin-left: 40px; margin-top: 3px;
                      font-weight: normal"&gt;
                      Contact Info&lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="my_profile_container" align="center"&gt;
              &lt;div class="clear"&gt;
              &lt;/div&gt;
              &lt;div class="emolyer_box"&gt;
                  &lt;div align="center" class="mailbox"&gt;
                      &lt;table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"&gt;
                          &lt;tr&gt;
                              &lt;td height="30" align="left"&gt;
                                  @Html.Label("Contact Person Name:")&lt;label style="color: Red"&gt;*&lt;/label&gt;
                              &lt;/td&gt;
                              &lt;td width="319" height="30" align="left" valign="middle"&gt;
                                  @Html.TextBoxFor(x =&gt; x.ContactPersonName, new { id = "txtContPersonName", Name = "ContactPersonName", @class = "input" })
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td colspan="2"&gt;
                                  &amp;nbsp;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td height="30" align="left" valign="middle"&gt;
                                  @Html.Label("Phone No:")&lt;label style="color: Red"&gt;*&lt;/label&gt;
                              &lt;/td&gt;
                              &lt;td width="319" height="30" align="left" valign="middle"&gt;
                                  @Html.TextBoxFor(x =&gt; x.InstitutePhoneNo, new { id = "txtInstitutePhoneNo", Name = "InstitutePhoneNo", @class = "input" })
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td colspan="2"&gt;
                                  &amp;nbsp;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td height="30" align="left"&gt;
                                  @Html.Label("Logo On Home Page:")
                              &lt;/td&gt;
                              &lt;td width="319" height="30" align="left" valign="middle"&gt;
                                  &lt;input type="checkbox" disabled="disabled" title="Subscription required for this feature" /&gt;
                                  &lt;a style="text-decoration: none; color: Gray; cursor: default;" title="Subscription required for this feature"&gt;
                                      &lt;u&gt;Add/Edit Details&lt;/u&gt;&lt;/a&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/table&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="emolyer_box"&gt;
                  &lt;div align="left" class="mailbox"&gt;
                      &lt;table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"&gt;
                          &lt;tr&gt;
                              &lt;td height="30" align="left"&gt;
                                  @Html.Label("E-Mail:")&lt;label style="color: Red"&gt;*&lt;/label&gt;
                              &lt;/td&gt;
                              &lt;td width="319" height="30" align="left" valign="middle"&gt;
                                  @Html.TextBoxFor(x =&gt; x.ContactPersonEmailID, new { id = "txtContactPersonEmailID", Name = "ContactPersonEmailID", @class = "input" })
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td colspan="2"&gt;
                                  &amp;nbsp;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td height="30" align="left" valign="middle"&gt;
                                  @Html.Label("Web Site URL:")
                              &lt;/td&gt;
                              &lt;td width="319" height="30" align="left" valign="middle"&gt;
                                  @Html.TextBoxFor(x =&gt; x.InstituteWebSite, new { id = "txtInstituteWebSite", Name = "InstituteWebSite", @class = "input" })
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td colspan="2"&gt;
                                  &amp;nbsp;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;tr&gt;
                              &lt;td height="30" align="left"&gt;
                                  @Html.Label("Upload Logo Image:")
                              &lt;/td&gt;
                              &lt;td width="319" height="30" align="left" valign="middle"&gt;
                                  @Html.TextBox("uploadfile", "", new { @class = "input", id = "fileupload", type = "file" })
                              &lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/table&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="clear"&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;input type="text" value="@TempData["Message"]" /&gt;
      &lt;/div&gt;
      &lt;!-- End of contact info --&gt;
      &lt;input type="button" class="green_btn" value="Save" disabled="disabled" style="cursor: default"
          title="Subscription required for this feature" /&gt;
      &lt;input type="submit" class="blue_btn" value="Post" /&gt;
      &lt;input type="button" class="blue_btn" value="Cancel" /&gt;
      &lt;input type="text" value="@TempData["Message"]" /&gt;
      @Html.Hidden("HiddenField", TempData["Message"])
  &lt;/div&gt;
  
  }
  </code></pre>