routelink

ASP.net MVC RouteLink and optional routeValues

I'm trying to figure out how to conditionally set a routeValue which is optional. I have <%= Html.RouteLink("<<<","Products",new { page=(Model.Products.PageIndex) }) %> If a visitor clicks on a "category" I only show products of that category, but if there is no "category" I show all products. These 2 URLs would be valid: /Product...

Generating a link containing a fragment with ASP.Net MVC Routelink

I'm trying to use Html.RouteLink within a view to generate a link to a named anchor on another page. There's a few definitions for RouteLink that include a fragment option but I'm trying to figure out if there's another way. public static string RouteLink( this HtmlHelper htmlHelper, string linkText, string routeName, st...

Actionresult doesnt get called by routelink. Formcollection the culprit?

Hi guys. I am fairly new to MVC. I am trying to set up a search page that searches a database and returns results. The search box is within a Html.BeginForm in my View, and looks like this: <% using (Html.BeginForm()) { %> <%= Html.TextBox("searchBox", null, new { @id = "searchBox" })%> <div id="searchButtonsDiv"> ...

Asp.net MVC add textbox value to routelink

Hi Everyone! I am trying to learn asp.net MVC and having an issue to submit a textbox value to a model. I have a text box in which users will type a number and when they hit the routelink the routelink will take the value from the textbox and assigns it to one of .Page item. <%=Html.TextBox("PageIndex")%> <%=Html.RouteLink("Search", "...

RouteLink in HtmlHelper?

How can I make up a RouteLink in a custom HtmlHelper? I know how to make it in a partial view but I want to build up a new link in a custom htmlhelper extension method with the use of a RouteLink. How to accomplish this? Update: I noticed HtmlHelper.GenerateRouteLink. But what do I need to put in as parameters? ...

tooltip for html.RouteLink

hello all, is it possible to write tooltip for html.RouteLink? my link: <%= Html.RouteLink("<", new { page = (Model.PageIndex - 1)},null)%> Thank and take care, Ragims ...