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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:59:07+00:00 2026-05-18T02:59:07+00:00

Interesting problem. In a project scope change, I broke one application into two applications.

  • 0

Interesting problem.

In a project scope change, I broke one application into two applications. I created a new project instead of trying to hack the existing application into two and reused much of the previously written code. I am down the the final bug that is making me pull my hair out.

I have a list of items with a checkbox in each row to allow the user to work with multiple rows at a time. I have some jQuery validate logic to make sure an option is selected on a dropdown and at least one row is selected. This works, however nothing seems to happen when I click the submit button. I even set a breakpoint on the first line of code in the function and it is never triggered. The code is the same with the exception of changing the action from Display to Index. Any thoughts?

Code follows:

<% using (Html.BeginForm("Index", "Timesheet", FormMethod.Post, new { Id = "form1" }))
   { %>
<%= Html.DropDownList("DropDownAction", new SelectList(Model.Actions, "Value", "Text"), "(Select)", new { Class = "required" })%>
<input type="submit" value="Submit" />
....
<% } %>

TimesheetController.cs

    //
    // GET: /Timesheet/
    [Authorize]
    public ActionResult Index()
    {
        ....
    }

    //
    // POST: /Timesheet/
    [HttpPost, Authorize]
    public ActionResult Index(int[] CbSelect, string DropDownAction, SupervisorCredentials user)
    {
        foreach (int id in CbSelect)
        {
            ...

        }

        return RedirectToAction("Index");
    }

Generated HTML:

<form Id="form1" action="/Timesheet" method="post"><select Class="required" id="DropDownAction" name="DropDownAction"><option value="">(Select)</option>
<option value=" ">Approve</option>
<option value="P">Paper Signature</option>
<option value="A">Absent Employee</option>
</select>
<input type="submit" value="Submit" />

Update: I removed the jQuery and now I am getting a null exception. My posted values are DropDownAction=P&CbSelect%5B%5D=274680&CbSelect%5B%5D=275744. Why wouldn’t public ActionResult Index(int[] CbSelect, string DropDownAction) work? I get the right value in DropDownAction and a null in CbSelect.

  • 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-18T02:59:08+00:00Added an answer on May 18, 2026 at 2:59 am

    Not sure why, but apparently in my jQuery validate section, I had debug: true. It appears like that prevents the form from being actually submitted. I have no idea how that got there. I didn’t add it. The form works now though.

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

Sidebar

Related Questions

I've encountered an interesting problem while developing for our legacy XWindows application. For reasons
I have one interesting problem. I must parse mail body (regular expression), get some
Developing a heavily XML-based Java-application, I recently encountered an interesting problem on Ubuntu Linux.
Here's an interesting problem. On a recently installed Server 2008 64bit I opened IE
I have a very interesting problem on my LinqToSql model. On some of my
He're an interesting problem that looks for the most Pythonic solution. Suppose I have
I have an interesting problem and would appreciate your thoughts for the best solution.
So I came across an interesting problem today. We have a WCF web service
An interesting issue came up recently. We came across some code that is using
AOP is an interesting programming paradigm in my opinion. However, there haven't been discussions

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.