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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:42:56+00:00 2026-05-20T18:42:56+00:00

Here is my Controller: public class MatchManagerController : Controller { // // GET: /MatchManager/

  • 0

Here is my Controller:

public class MatchManagerController : Controller
{
    //
    // GET: /MatchManager/

    public ActionResult Index()
    {
        return View();
    }
    public ActionResult CreateMatch()
    {

        return View();
    }

}

Here is my View:

@model MatchGaming.Models.MatchModel

@{
ViewBag.Title = “CreateMatch”;
}

CreateMatch

@using (Html.BeginForm()) {
@Html.ValidationSummary(true)

MatchModel

    <div class="editor-label">
        @Html.LabelFor(model => model.MatchName)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.MatchName)
        @Html.ValidationMessageFor(model => model.MatchName)
    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.MatchDescription)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.MatchDescription)
        @Html.ValidationMessageFor(model => model.MatchDescription)
    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.Wager)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Wager)
        @Html.ValidationMessageFor(model => model.Wager)
    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.MatchTypeId)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.MatchTypeId)
        @Html.ValidationMessageFor(model => model.MatchTypeId)
    </div>

    <p>
        <input type="submit" value="Create" />
    </p>
</fieldset>
}

<div>

        @Html.ActionLink("Back to List", "Index")
    </div>

I want my MatchTypeId to be a drop down that populates from my table MatchTypes.

  • 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-20T18:42:56+00:00Added an answer on May 20, 2026 at 6:42 pm

    I’m assuming that you have a MatchTypes table in your database that has Id filed and Description field. You want to display a drop down that will show different MatchType descriptions.

    Include a field in you model that returns collection of MatchTypes records from the MatchTypes table. Then instead of LabelFor do this:

    @Html.DropDownListFor(m => m.Description, Model.MatchTypes)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Controller public class DashboardController : Controller { // // GET: /Dashboard/ public ActionResult Index()
Model: public class Model { public ItemType Type { get; set; } public int
So I have a page to edit employees. Here is my view model: public
Consider the following model and controller: public class SimpleModel { [Required(ErrorMessage=Email Address is required.)]
How do you decide if something goes in the view or the controller? Here
I got a ASP.NET MVC controller like this [Authorize] public class ObjectController : Controller
here's the code (simplified): public abstract class PageBase implements Serializable { private static final
Inside my controller's action I have the following code: public ActionResult GridAction(string id) {
Here is my code: ThreadStart threadStart = controller.OpenFile; Thread thread = new Thread(threadStart); thread.Start();
Here is the idea: When the user wants to see /controller/action, then I want

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.