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

  • Home
  • SEARCH
  • 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 6913427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:13:04+00:00 2026-05-27T09:13:04+00:00

I have a C#.NET web app and would like to save my underlying Model

  • 0

I have a C#.NET web app and would like to save my underlying Model anytime the user navigates off a View. I am using the .Net Entity Framework witha DbContext object. How would I implement a Save on Navigation?

  • 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-27T09:13:05+00:00Added an answer on May 27, 2026 at 9:13 am

    All….thanks for the comments. It was educational. Using the info provided regarding forms and posts, I used buttons to do poast and investigated their valuse to decide what action to perform.

    On the Views that had navigation links, I swapped in the input buttons and used CSS to make them look and act like hyperlinks.

    and

            <input style="width:40px;" 
                class="navigate_save_header" 
                type="submit" name="NavSave" 
                value="Delete SubTask"
            /> 
    

    The Task Controller has “NavSave” as a parameter into the Edit [POST]….and the value is either “Create SubTask” or “Delete SubTask”. In the controller, I check if “NavSave” is null or not….if not, I then examine the value. If “Create SubTask”, I save the Task Model and navigate to the Subtask Create[GET] method. If “DeleteSubTask”, I save the Task Model and navigate to the Subtask Delete[GET] method. In order to do this, I also have a hidden field containing the SubTask id….so when I Navigate to the Delete[Get] method, I know which SubTask to delete.

    Give comments if you like…

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

Sidebar

Related Questions

I have a C# .NET web app and would like to implement an UNDO
I have ASP.NET GridView in my web app and would like to bind two
I have a asp.net/c# web app. When do user leave a certain page, I
I have a SQL query in my ASP.net web app that looks like this:
Using Visual Studio 2008 and VB.Net: I have a working web app that uses
I have an asp.net web app where a user can update a table in
We have an ASP.net web application and would like to host on Azure to
I have this .NET web app that draws a table in Page_Load. Then after
Have an ASP.net web app which works fine for a few days, but then
I have an asp.net update web app. Users go the the page, hit the

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.