Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8748071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:27:46+00:00 2026-06-13T12:27:46+00:00

In MVC3, i created one register form. I created one model,,controller and view. This

  • 0

In MVC3, i created one register form. I created one model,,controller and view. This is my code:

   [HttpGet]
    public ActionResult Insert()
    {
        Models.Employees objEmpl = new Models.Employees();
        return View(objEmpl);
    }

    [HttpPost]
    [AcceptVerbs("Post")]
    public ActionResult Insert(Models.Employees objs)
    {
        var v = new Models.test().InsertDl(objs);
        return View();
    }
  The above is my controller

   @model MvcVideo.Models.Employees
 @{
   ViewBag.Title = "Insert";
    Layout = "~/Views/Shared/VideoLayout.cshtml";
  }
<h2>Insert</h2>
 @using(Html.BeginForm("Insert","Home",FormMethod.Post ))
 {
  <table>
 <tr>
   <td>
      Employee Name
   </td>
   <td>
     @Html.TextBox("Ename",@Model.Enames)
   </td>
 </tr>
 <tr>
   <td>
     Department Id
   </td>
   <td>
     @Html.TextBox("Departmentid",@Model.DepartId )
   </td>
 </tr>
 <tr>
   <td>
      Email Id
   </td>
   <td>
      @Html.TextBox("Emailid",@Model.EmailIds) 
   </td>
 </tr>
  <tr>
    <td>
      Address
    </td>
    <td>
       @Html.TextBox("Address",@Model.Adress)
    </td>
  </tr>
  <tr>
    <td colspan="2" style="text-align:center;" >          
    <button  title ="Ok"   value="OK"></button>   
    </td>
  </tr>
</table>

}

But the objs object at public actionresult Insert(models.Empoyees objs) action method parameter is showing null values. Imean Ename=Null, Department=0, Emailid=Null and Address=null

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T12:27:47+00:00Added an answer on June 13, 2026 at 12:27 pm

    Replace this

    @Html.TextBox("Ename",@Model.Enames)
    

    With

    @Html.TextBoxFor(model => model.Enames)
    

    This will fix your issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created one mvc3 application. There is one form where i'm taking values
I'm new to mvc3. I created one web project though mvc3 . On Index
i have created an mvc3 web application that uses forms based authentication. one part
I'm new to MCV and I'm learning MVC3. I created a model and a
I have created an editor template for one of my models in my current
When mvc3 was created I placed one of these on my _layout.cshtml page... @Html.RenderCss()
I've created a REST API in MVC3 and one the things I need to
I have created a new MVC3 project and used the ADO.NET Entity Data Model
I have a View in my MVC3 application which displays one of two pretty
I created a QueryStringModule based on the one found here: https://stackoverflow.com/questions/6157150/mvc3-encrypted-querystring-parameters It works fine

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.