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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:29:21+00:00 2026-05-18T06:29:21+00:00

My baldness is growing more rapidly than it should be. I first posted this

  • 0

My baldness is growing more rapidly than it should be. I first posted this question a couple days ago. I now know the problem and have it working… sort of. Another problem surfaced in it’s place.

To solve the previous problem, I manually created the name to requestedDays[{0}].DateOfLeave where {0} was a Guid. This allowed my controller to properly receive the List<> of values.

Using this article’s method, the name generated is requestedDays[{0}].DayRequested.DateOfLeave which my controller doesn’t properly receive because the name has the class in it, DayRequested.DateOfLeave.

    [Authorize, HttpPost]
    public ActionResult Create(LeaveRequest leaveRequest, List<DayRequested> requestedDays)
    {
    }

I have tried to figure out work-arounds with the manual generation, but nothing I have tried works thus far. You can see my validation method here. I do know about the second part of Sanderson’s article on validation however, it is quite hard to validate something that isn’t being passed into the method.

This is my ViewModel I am using in my partial view.

public class LeaveRequestRow
{
    public LeaveRequestRow(DayRequested dayRequested, List<SelectListItem> leaveRequestType)
    {
        this.DayRequested = dayRequested;
        this.LeaveRequestType = leaveRequestType;
    }

    public List<SelectListItem> LeaveRequestType { set; get; }
    public DayRequested DayRequested { set; get; }
}

Does anyone have any ideas on how to proceed? Should I convert my dropdown to a jQuery build control and stop using the ViewModel?

  • 1 1 Answer
  • 1 View
  • 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-18T06:29:21+00:00Added an answer on May 18, 2026 at 6:29 am

    I have solved this, though not as elegantly as I had hoped. All TextBoxFor had to be changed to TextBox along with the addtional changes needed with doing this. The names then were correctly generated and I could move on. This did break the ability for the validation message to appear next to the field, though ValidationSummary still does work. I will be working on fixing that later on and post code samples and a solution on my website.

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

Sidebar

Related Questions

I am creating a validation script which is way more advanced than this little
I fully understand this question has been asked a lot , but I'm asking
More a custom and practice question, but is it considered poor form, or highly
i saw a stack question posted already: [question]: < Text in div - automated
So I have this code right, and it basically reads an XML file and
(btw. This refers to 32 bit OS) SOME UPDATES: This is definitely an alignment
I have this HTML code (it is located in contenteditable=true block): <ol> <li>Mozilla Firefox
I want to know What are the ways to modify the font in android
I have a file named insert.txt. It can look like this (or uglier): ASDFG?|??|?\/\HJKL<MNBVCXZQWERTYUIOP
I am confused about the search list feature in NSUserDefaults . The class reference

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.