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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:35:29+00:00 2026-05-25T21:35:29+00:00

My form keys are: Request.Form.AllKeys {string[9]} [0]: __RequestVerificationToken [1]: stud.LastName[0] [2]: stud.FirstName[0] [3]: stud.Number[0]

  • 0

My form keys are:

Request.Form.AllKeys
{string[9]}
    [0]: "__RequestVerificationToken"
    [1]: "stud.LastName[0]"
    [2]: "stud.FirstName[0]"
    [3]: "stud.Number[0]"
    [4]: "stud.LastName[1]"
    [5]: "stud.FirstName[1]"
    [6]: "stud.Number[1]"

They all have values.
My action looks like this:

        [ValidateAntiForgeryToken]
        [HttpPost]
        public ActionResult Add(Student[] stud)

Student class has properties :FirstName, LastName, Number.

The problem is that stud is null?
Isn’t a way to get it populated with submitted data, o or have to take the data from Request.Form

  • 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-25T21:35:30+00:00Added an answer on May 25, 2026 at 9:35 pm

    You should have this kind of values (note the changed [] location)

    Request.Form.AllKeys
    {string[9]}
        [0]: "__RequestVerificationToken"
        [1]: "stud[0].LastName"
        [2]: "stud[0].FirstName"
        [3]: "stud[0].Number"
        [4]: "stud[1].LastName"
        [5]: "stud[1].FirstName"
        [6]: "stud[1].Number"
    

    Something wrong is going on in your views – generated inputs(and when submitted, form values) do not have ‘[]’ in right places in thier names. Take a look at this article by Phil Haack about model binding to a list.

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

Sidebar

Related Questions

This works to loop through all Form keys: foreach (string s in Request.Form.Keys )
My Request.Form keys are all prefixed with ctl00$container name$ and then the key I
I have an asp.net web form application running in a web farm? All the
I have a list of tuples of foreign keys of the form [(3,2),(2,3)] .
I want to have 2 Foreign Keys for an Inline form in the admin.
I have two hash tables in the form of dictionaries. The keys map features
How to navigate the image using Keyboard arrow keys in C#. My 1st form
Form validation for check boxes only seems to be working in IE....? Anyone have
My form receives asynchronous callbacks from another object on random worker threads. I have
if Form.Release is called after using the form, it will free all related memory

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.