asp.net mvc - Html.ActionLink problems -


I am trying to provide a link to filter the search results.

  & lt;% = Html.ActionLink ("filter result", "index", new {page = model.listed in restaurant.page index (), search text = model.search text , Usefilter = true, filter option = model.filteroptimation, filtertext = modelFiltertext}, empty) & gt%;  

The definition of the controller is such.

  Public ActionCheck Index (anti-page, string search text, bull usage filter, string filtertext, string filter operation)  

But when I debug it, the values ​​are not set correctly, even the use of a filter variable.

My link is localhost / home / index / true? Page = 0

Any ideas how to fix this?

The code segment looks ok I think there are 2 possible errors:

  1. Information about the wrong path: Make sure the routes in the global.ascx.cs / vb file to ensure a route for Home #. Call MapRoute (...) #
  2. Incorrect Controller: Try to use the overlink overlink which clearly specifies a controller

If you If you still can not work, you may want to post more information (route mapping code, view / controller name)


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -