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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:44:58+00:00 2026-05-25T03:44:58+00:00

I am creating a form in an ASP.NET MVC 3 view, in which one

  • 0

I am creating a form in an ASP.NET MVC 3 view, in which one field is to specify a list of ints (corresponding to List<int> in the edited model). How can I generate this editor field in my view? I assume there are MVC 3 helpers I can make use of.

  • 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-25T03:44:58+00:00Added an answer on May 25, 2026 at 3:44 am

    If you want a dropdownlist you can use the HTML.DropDownList helper method. Is this what you want or do you need to display the List as an Ordered/Unordered HTML list?

    EDIT

    You can create your own HTML Helper function. Assuming you use Razor you can follow the following steps

    1.)Create a new .cshtml file inside App_Code directory and name it as you want (for example HTMLHelpers.cshtml)

    2.)Write the following in the file

    @helper OrderedList(List<int> list) {
        <ul>
            @foreach (var item in list)
            {
                <li>@item</li>
            }
        </ul>
    }
    

    3.)Now in your view you can call your new function. For example write

    @HTMLHelpers.OrderedList(Model)
    

    2nd EDIT

    You can also use Javascript to achieve that functionality. Knockout.js from Steven Sanderson is a great library that helps you to databind values to html elements.

    This sample from knockout.js documentation is similar to your needs.

    You can also view this blog post from Steven Sanderson that explains how to use Knockout.js with a variable length list and how to submit the list data back to server.

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

Sidebar

Related Questions

I am working on rendering a dynamic form in an ASP.NET MVC view that
I am working with asp.net mvc and creating a form. I want to add
I am creating a view containing a form in ASP.NET MVC3 for a model
i'm creating a form on asp.net mvc 2 and i need to submit my
I am using ASP.NET MVC 1.0. I am creating a view to Create a
I'm creating a multi-part web form in ASP.NET that uses Panels for the different
I'm creating a form in ASP.NET that would generate a report. And I'm using
I am creating a web application using Form Authentication of Asp.Net with C# and
I am working on an ASP.NET MVC application which has a model for a
One of the new features in ASP.NET MVC 2 Preview 1 is support for

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.