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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:59:49+00:00 2026-06-05T11:59:49+00:00

The page currently displayed in my browser is: http://localhost:19255/Object/Browse/1 . A link on this

  • 0

The page currently displayed in my browser is: http://localhost:19255/Object/Browse/1.

A link on this page is created with: @Html.ActionLink("...", "Browse", "Object")

But the generated link is actually: /Object/Browse/1

My understanding of what’s happening is that MVC sees my route has an {id} portion, which I did not supply. So it went ahead and included the {id} portion from the current page.

Fair enough, but how do I create a link without it? I tried null, and new { id = null } but neither worked.

  • 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-05T11:59:50+00:00Added an answer on June 5, 2026 at 11:59 am

    While neither of the following work:

    @Html.ActionLink("...", "Browse", "Object", null)              // Has no effect
    @Html.ActionLink("...", "Browse", "Object", new { id = null }) // Error
    

    The following solves the issue:

    @Html.ActionLink("...", "Browse", "Object", new { id = "" })   // No ID is passed
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have page which encoding is declared with <meta http-equiv=Content-Type content=text/html; charset=UTF-8 /> But
this is page i'm currently working on: http://devel.spoorle.com/poc/ At the bottom there is a
I currently have pagination functionality that displays the total page count, but I was
The upload script in this page is currently uploading the images to the same
I currently create an object on page load with all possible key/value pairs and
Currently the location of my Html is http://severname.com/qotw.html . Onclick of a button i
Currently, I have: header('Refresh: 300;url=http://www.ohjustthatguy.com/uploads/'); $_SESSION['refresh'] = 'true'; This is a timer to redirect
I have simple WebView code like this: WebView wv = (WebView) findViewById(R.id.webview1); wv.loadUrl(http://en.wikipedia.org/wiki/Book); But
I am currently running this code, and although the web browser appears, the web
My jQuery UI handle displays the number 14 correctly when loading the page, but

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.