Note that there are some explanatory texts on larger screens.

plurals
  1. PONavigate to Index view of another controller in ASP.NET MVC 4
    primarykey
    data
    text
    <p>I am Inside <strong>Index</strong> View of <strong>Home</strong> controller.</p> <p>I have created one controller called <strong>EstimationTracker</strong> with default <strong>Index</strong> action method. I have also created <strong>Index</strong> view of <strong>EstimationTracker</strong>. But, nothing is there inside <strong>Index</strong> action method of <strong>EstimationTracker</strong> controller.</p> <p>Now, I want to create <strong>Html.ActionLink</strong> inside <strong>Index</strong> view of <strong>HomeController</strong> to navigate to <strong>Index</strong> view of <strong>EstimationTracker</strong> controller.</p> <p>I have written the following code to achieve this:</p> <pre><code>@Html.ActionLink("Estimation Tracker", "Index", "EstimationTracker", null, new { }) </code></pre> <p>In the Browser, if I click on "Estimation Tracker" hyperlink, the page is generating the following URL:</p> <pre><code>http://localhost:8416/EstimationTracker/ </code></pre> <p>and popping up the following error:</p> <p><strong>HTTP Error 403.14 - Forbidden</strong></p> <p><strong>The Web server is configured to not list the contents of this directory.</strong></p> <p>When I append <strong>Index</strong> to the above URL i.e.: </p> <pre><code>http://localhost:8416/EstimationTracker/Index </code></pre> <p>Now, the page is fine.</p> <p>How can I make the page run smoothly without any error.</p> <p><strong>Update:</strong></p> <p><strong>I'm using Default Routing only.</strong> like below</p> <pre><code> public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } ); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload