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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:56:22+00:00 2026-06-17T15:56:22+00:00

I am trying, without any luck, to use the selected item from a drop

  • 0

I am trying, without any luck, to use the selected item from a drop down list in the controller. I’ve stepped through the code and can see that each of the string values are “null” after they should be assigned.

Below is the code from the View

<span id="searchBox" class="boxMe" >
      <select id="Table" title="Table" style="font-size:8pt;">
        <option value="default">--Table Name--</option>
        <option value="CE">CE</option>
        <option value="PT">PT</option>
      </select>
      <select id="IssueType" style="font-size:8pt;">
        <option value="default">--Issue Type--</option>
        <option value="W">Warning</option>
        <option value="E">Error</option>
      </select>
      <select id="Status" style="font-size:8pt;">
        <option value="default">--Status Type--</option>
        <option value="O">Open</option>
        <option value="U">Under Review</option>
      </select>


    <input type="image" src="@Url.Content("~/Content/Images/Filter.bmp")" alt="Filter" style="padding-top: 0px;" />
    <a href="#" style="padding-left: 30px;"></a>
</span>

And here is what I have in the controller. As this is a search filter I have this in the Index() method at the moment.

    public ViewResult Index(FormCollection dropDownSelection)
    {
        string table = dropDownSelection["Table"];
        string issue = dropDownSelection["IssueType"];
        string status = dropDownSelection["Status"];

        return View(db.FollowUpItems.ToList());
    }
  • 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-06-17T15:56:23+00:00Added an answer on June 17, 2026 at 3:56 pm

    You should use the name attribute on your <select> tags, rather than id. The name is what is used as the key in the form post:

    <select name="Table" title="Table" style="font-size:8pt;">
    

    If you haven’t already, you should also wrap your inputs in <form> tags:

    <span ...>
        <form method="post">
            <!-- Inputs -->
        </form>
    </span>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to use the asp.net menucontrol but sadly without any luck. Here is
I'm trying this for almost two hours now, without any luck. I have a
I'm trying to configure nhibernate 2.1.2 to run in medium trust, without any luck.
I'm trying to check if a folder has any subfolders without iterating through its
I'm trying without any luck to include string s in my C++ Win32 API
I'm trying without any luck to come up with a method to pass Bruno
I have been trying to ask this before, without any luck of explaining/proving a
I'm trying to change the printer tray using the Python win32print module without any
I am trying to figure out how to declare my delegates without getting any
Currently am trying to read and write mp3 tags without using any external modules

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.