Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Edit not working

Edit not working

Scheduled Pinned Locked Moved ASP.NET
databaseasp-netjsonarchitecturehelp
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sunsher
    wrote on last edited by
    #1

    Hi, I created a mvc web project with scaffolding that displays well in the Index page. When I edit, I do not want any of the fields in the edit page to edit. Instead, I added a textbox whose value I calculate and save the rest of the fields to the database. I cannot get this to work, as the model in the HttpPost is null. Please help. Thanks

    V Richard DeemingR J 3 Replies Last reply
    0
    • S sunsher

      Hi, I created a mvc web project with scaffolding that displays well in the Index page. When I edit, I do not want any of the fields in the edit page to edit. Instead, I added a textbox whose value I calculate and save the rest of the fields to the database. I cannot get this to work, as the model in the HttpPost is null. Please help. Thanks

      V Offline
      V Offline
      Vincent Maverick Durano
      wrote on last edited by
      #2

      Have you looked into any tutorials about doing CRUD in ASP.NET MVC? You should be able get more references in the web. The idea is to send back the model to your action method if your action requires the model on POST request. I would really recommend you to read the basics on how MVC arch works before jumping into the limbo. Here's an article that may help you understand the basic of ASP.NET MVC: ASP.NET MVC 5: Building Your First Web Application - Part 1[^]

      1 Reply Last reply
      0
      • S sunsher

        Hi, I created a mvc web project with scaffolding that displays well in the Index page. When I edit, I do not want any of the fields in the edit page to edit. Instead, I added a textbox whose value I calculate and save the rest of the fields to the database. I cannot get this to work, as the model in the HttpPost is null. Please help. Thanks

        Richard DeemingR Offline
        Richard DeemingR Offline
        Richard Deeming
        wrote on last edited by
        #3

        There's a problem somewhere in your secret code. You should fix that. If you want someone else to help you fix it, then you'll need to share the relevant parts of your code.


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

        1 Reply Last reply
        0
        • S sunsher

          Hi, I created a mvc web project with scaffolding that displays well in the Index page. When I edit, I do not want any of the fields in the edit page to edit. Instead, I added a textbox whose value I calculate and save the rest of the fields to the database. I cannot get this to work, as the model in the HttpPost is null. Please help. Thanks

          J Offline
          J Offline
          jkirkerx
          wrote on last edited by
          #4

          Did you wrap the textboxes and submit button in a form tag or element?, so the input elements post back to the controller.

          21st Century Globalism has become Socialism on a planetary scale, in which the unequal treaties of the past have come back into play.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups