Questions tagged [actionlink]

In ASP.NET MVC, the ActionLink method renders an element that links to an action method in a controller. Specifically, it returns an anchor element ( tag) that contains the virtual path of the specified action method (possibly with route parameters).

In ASP.NET MVC, the ActionLink method renders an element that links to an action method in a controller. Specifically, it returns an anchor element ( tag) that contains the virtual path of the specified action method (possibly with route parameters).

LinkExtensions.ActionLink Method
http://msdn.microsoft.com/en-us/library/system.web.mvc.html.linkextensions.actionlink.aspx

605 questions
4
votes
3 answers

MVC - why use ActionLink instead of hard coding the link?

Microsoft MVC, Razor, Visual Studio 2013 I can create a link using either of these 2 methods. Is there any benefits in using the Html.ActionLink method, as I cannot see any ? My Reviews @Html.ActionLink(linkText:="My…
John Hind
  • 123
  • 2
  • 6
4
votes
1 answer

ASP.NET MVC ActionLink vs. URL Rewrite

There is a ASP.NET MVC 2 web app, lets call it myapp.com. I want dynamic subdomains (user created categories) like something.myapp.com. So i have set up URL rewrite with rule rewriting something.myapp.com -> myapp.com/something (which is handled by…
rouen
  • 5,003
  • 2
  • 25
  • 48
4
votes
2 answers

MVC ActionLink in the Umbraco request context?

I'm currently working with Umbraco 6.1.6 and some mvc views and controllers. What I try to do is the following: In my razor view I have the following line to create an actionlink: @Html.ActionLink("Klik to search...", "Search", "Search", new {…
user3540491
4
votes
2 answers

MVC 3 Ajax Loading Icon when navigating to a new page/action method

I have been searching extensively on how to create a navigation link that will display an ajax Loading icon while the action method is running in MVC 3 using the Razor view engine. While I have found plenty of information regarding adding a loading…
Chad LaCroix
  • 161
  • 1
  • 7
4
votes
4 answers

Attach image to ActionLink in MVC 4

I am using ActionLink with id in MVC 4 app and assinging actionLink id an image in css but on on earth I am doing wrong. is not working! here is my code
@Html.ActionLink(" ", "Index", "Home", null, new { id…
K.Z
  • 5,201
  • 25
  • 104
  • 240
4
votes
1 answer

Get value from DropDownList, use it in ActionLink (ASP.NET MVC4)

I have this in my View: @Html.DropDownList("dropBox", (List)ViewBag.SelectedListItems) I would like to get the selected value from the dropBox and post it back to the controller using like this: @Html.ActionLink("Add","AddAction",…
Hudson
  • 839
  • 1
  • 10
  • 15
4
votes
0 answers

stop propagation of an ajax action-link in asp .net mvc

I have a table in my code with action links to make updates and deletes of some data. And this table is inside a div that has to change when i make the updates or deletes. The problem is: when i click those actionlinks, i have some ajax…
4
votes
2 answers

Are there conflict between RouteValueDictionary and htmlAttributes?

I am using a RouteValueDictionary to pass RouteValues to a ActionLink: If I code: <%:Html.ActionLink(SharedResources.Shared_Pagination_First, Model.ActionToExecute, Model.ControllerToExecute, Model.FirstRouteValues, null)%> The link result is…
Pedre
  • 446
  • 1
  • 8
  • 16
3
votes
2 answers

ASP.NET MVC 3 - Ajax.ActionLink() Routing

This ActionLink works fine when it is outside of an area, but as soon as I moved it into one it started appending the name of the controller to the url:TrainingandDevelopment/MakeCall It should just be displaying the paritial view that it is…
3
votes
1 answer

Actionlink to child action

I have called a view from another with Html.Action method. I want to call the same action with a parameter Inside the child view, when user click the action link. When I write this code I get this error message: Html.ActionLink("link", "Configure",…
mavera
  • 3,171
  • 7
  • 45
  • 58
3
votes
1 answer

How to send data through actionlink in asp.net?

In the application that I am trying to make, I have a menu in my view as below: where…
Lavanya Mohan
  • 1,496
  • 7
  • 28
  • 39
3
votes
2 answers

Can Html Helpers be used outside of a Razor page

I have a class 'IncomeStatement' that is used as a ViewModel. This class has a property that generates some fairly complicated html like this: public MvcHtmlString HtmlPeriods { get; set; } .... StringBuilder htmlPeriods = new…
Dick de Reus
  • 779
  • 1
  • 7
  • 15
3
votes
1 answer

how to provide button style to an html actionlink

how to provide button style to an html actionlink
ilfa hasan
  • 41
  • 1
  • 2
  • 3
3
votes
3 answers

MVC5 Ajax.ActionLink Loads New Page Instead of Replacing

I know that similar questions have been asked and answered multiple times; for the life of me I cannot determine what I am missing, please bear with me. I am trying to load a partial view with an editor for an item on the page, and display that…
Scott Baker
  • 10,013
  • 17
  • 56
  • 102
3
votes
4 answers

How do you override route table default values using Html.ActionLink?

Global.asax route values routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = UrlParameter.Optional, filterDate =…
BlackICE
  • 8,816
  • 3
  • 53
  • 91