0

Based on this question: here! I was able to successfully fill the textboxes based on the value of the dropdownlist. Now I need to add a second DDL to the same view. How can I accomplish this?

If I create a second Controller and View binded to a second table in the database I'm able to populate the other textboxes using a second dropdownlist in the same view. By using:

    `<fieldset>
        <div class="form-horizontal">
            @Html.Action("SecondAction", "SecondController");
        </div>
    </fieldset>`

But then the form with all the textboxes beautifully filled cannot be posted to the database when the user click:

<input type="submit" value="Submit" class="btn btn-default" />

How can I accomplish this?

3
  • Let me get this clear, you are trying to pass data from the first view to the second view so that you can be able to pass the combined data as a whole to your second Controller? Commented Jun 25, 2017 at 4:57
  • user3499361, trying the same as the reference sample, I just need to add a second DropDownList using the same method. Maybe I should reformulate the question different: How can you add another SelectList using (string call) inside the same controller to fill a second DDL? Commented Jun 25, 2017 at 12:52
  • Trying to add a second DDL not matter where the data is coming from Commented Jun 25, 2017 at 14:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.