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 5994763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:51:50+00:00 2026-05-22T23:51:50+00:00

i am using MVC 3.0 with EF I have Table which contain Identity column

  • 0

i am using MVC 3.0 with EF
I have Table which contain Identity column with Auto Increment 1. Now i created a View for Edit with only FirstName,LastName and ID will be ReadOnly mode. Now i changed value First Name and Last Name and press submit button then it will gives me an error:

The parameters dictionary contains a
null entry for parameter ‘colID’ of
non-nullable type ‘System.Int32’ for
method ‘System.Web.Mvc.ActionResult
Edit(Int32,
CAFM.Business.Models.TabMasterViewModel)’
in
‘CAFM.Web.Controllers.TabMasterController’.
An optional parameter must be a
reference type, a nullable type, or be
declared as an optional parameter.
Parameter name: parameters

If i set ID from RedaOnly to Edit

@Html.DisplayFor(model => model.ID)

to

@Html.EditorFor(model => model.ID) 

then it is working perfectly.

Please provide your valuable suggestions!

Thanks,
Imdadhusen

  • 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-05-22T23:51:51+00:00Added an answer on May 22, 2026 at 11:51 pm

    That is quite obvious. When you post edits back to server it doesn’t post Id because Id is not in any HTML control – it is just a text. Because of that you cannot create valid entity for saving. You must always post Id back (for example in hidden field) and have some validation that the Id was not changed or that user still have permissions to change the record.

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

Sidebar

Related Questions

I have an application, built using MVC, that produces a view which delivers summary
I have a following table using MVC that shows number of items the user
I have an ASP.Net-MVC app using LinqToSql. I have a subcontracts table, a service_lines
I'm using MVC 1.0 and have created a RequireSSLAttribute (like the one in ASP.NET
I'm using ASP.NET MVC and have a model which has an image (byte array)
I have created a table in ASP MVC and populate it with data from
I am using asp.net mvc. I have generated a view that retrieve all unapproved
I have an ASP.Net MVC view which inherits from a ViewModel. The ViewModel contains
I'm using MVC 3 with unobtrusive javascript for client validation. I have a table
Im working on a pre created joomla component which using the MVC Architecture, My

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.