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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:56:14+00:00 2026-05-19T09:56:14+00:00

May be my question is going to be a little confusing, I’m building a

  • 0

May be my question is going to be a little confusing, I’m building a simple booking system with asp mvc 2 (I’m a beginner) I’ve generated the CRUD views with it’s controller. When I go to ~/bookings/create appears the autogenerated create form. But it appears with textfields, well I’m working on it changing them by some dropdown lists. The question is here, how do I save the form with the selected values in all the dropdowns and the textfields?

Thank you! And sorry if It’s kind of strange question, It’s my first time on Stack Overflow.

  • 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-19T09:56:14+00:00Added an answer on May 19, 2026 at 9:56 am

    You will need another action method adorned with [HttpPost] attribute and it will accept the same model object that you rendered as your form.

    So suppose the following was your action method that you used to create your form:

    public ActionResult Create(){
        var model = new Model();
        return View(model);
    }
    

    You will need to create another method like the following:

    [HttpPost]
    public ActionResult Create(Model model){
        if (ModelState.IsValid){
            //write the code to save the object here
            return RedirectToAction("Index); //This should be the where the user would go if the "Create" operation was successful
        }
        return View(model); //Else return the user to the same view and show any errors.
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My question may be a little confusing, but anyway. My school is going to
Simple question, the answer may not be... I'm going to be developing a web
Alright, I am going to state up front that this question may be too
The question may be a little vague but here's an example of what I
This question may seem a little bit stackoverflow-implementation specific, but I have seen a
So, this question may be a little vague, but I have constant discussions about
I'm using PHP to make a simple caching system, but I'm going to be
This question may be too product specifc but I'd like to know if anyone
This question may sound fairly elementary, but this is a debate I had with
My question may not make sense but I have valid reason. We use .net

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.