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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:10:07+00:00 2026-06-18T00:10:07+00:00

In my MVC3 project I have a controller Test with this method for Index

  • 0

In my MVC3 project I have a controller “Test” with this method for Index action

Function Index(fields() As String) As ViewResult
...

Then on the View I have a a multi-select drop down list

@Html.ListBox("fields", New MultiSelectList(my_list, "Value", "Text")) 

and everything works fine, however when I try to create an Actionlink passing multiple values of parameter “fields” in the querystring like this

@Html.ActionLink("TestLink", "Index", New With {
         .fields = "value1&fields=value2"}) 

I get the following broken link in the HTML source with the querystring encoded

<a href="/Test/Index?fields=value1%26fields%3Dvalue2">TestLink</a> 

How can I pass multiple values to a querystring parameter by ActionLink?

  • 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-18T00:10:08+00:00Added an answer on June 18, 2026 at 12:10 am

    If you want to do this dynamically by fetching the values from the listbox simply put the listbox inside a form whose action is pointing the controller action you want to invoke and then use a submit button. HTML will then do the job for you.

    If you want to generate an ActionLink you could use the following:

    @Html.ActionLink(
        "TestLink", 
        "Index", 
        New RouteValueDictionary() From { 
            { "fields[0]", "value1" }, 
            { "fields[1]", "value2" } 
        }
    )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In MVC 3 project, I have a Controller action that returns a View. Let's
In an ASP.NET MVC3 project I have a structure like this: Core.csproj -> 3rdparty1.dll
I have a Create View page in my MVC3 project to create instances of
I have a table in my .aspx view in MVC3 project. I am using
I'm developing MVC3 project and have this situation. only at runtime. I'm using the
I have a long time polling controller in my MVC3 project. It has its
I have a new MVC3 project with one Controller called PublicController.cs which contains 4
This is a MVC3 project using razor. Instead of displaying another view to inform
In my MVC3 project, I have a controller with an [Authorize] attribute. I have
I have a simple PartialView setup in my MVC3 Project using the Razor View

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.