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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:34:51+00:00 2026-06-17T19:34:51+00:00

What is the syntax for creating a link that navigates from one Controllers View

  • 0

What is the syntax for creating a link that navigates from one Controllers View to another? The following is code that is supposed to allow the user to navigate from the Index.cshtml of the FollowUpItems View to the Details.cshtml of the Agent View. I need to pass the value of item.Key1 in order for the Details.cshtml page to know exactly who to display.

I’m getting the following error and I have no clue what this means (I apologize for any lack on information, I am still very new to ASP MVC):

‘The parameters dictionary contains a null entry for parameter ‘id’ of non-nullable type ‘System.Int32’ for method ‘System.Web.Mvc.ViewResult Details(Int32)’ in ‘Monet.Controllers.FollowUpController’. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
Parameter name: parameters ‘

    <td>
        @Html.ActionLink(item.Key1, "Details", "Agent", new { id = item.Key1 })
    </td>

Here is the Index() method header of the page I’m trying to navigate to:

    public ActionResult Index(string searchString, string sortOrder, string currentFilter, int? page)
    {
  • 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-17T19:34:52+00:00Added an answer on June 17, 2026 at 7:34 pm

    Try this overload

    @Html.ActionLink(item.Key1, "Details", "Agent", new { id = item.Key1 },null)
    

    The third parameter is the routevalues and the fourth parameter is html attrubutes. If you want your link to have some html attributes, you may remove the null with some html attrubtes there like this

    @Html.ActionLink(item.Key1, "Details", "Agent",
                               new { id = item.Key1 }, new { class="myCssClass})
    

    Here is the complete list of all available overloads.

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

Sidebar

Related Questions

The Gradle User Guide shows a syntax for creating a task that I don't
Hi Following is the syntax for creating table in mysql. I want to create
I got following repeating syntax and I want to keep all <h1> that is
What's the syntax for creating a stored procedure that contains two queries, if the
I am using following syntax for creating a private synonym of a table in
The typical syntax for creating a db link is as follows: create database link
I have an application that stores products (reads them from a file, no user
I am sending an email through Outlook using VB.Net code. The syntax for creating
Simple PL/SQL question from a beginner: What is the proper PL/SQL syntax for creating
Is there any tangible difference between the two forms of syntax available for creating

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.