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
3
votes
1 answer

ActionLink Delete Confirmation

I want to make a Javascript popup asking if I want to delete a listing. Here is what I have at the moment (Doesn't work - Guid is null when catched by the Controller). @Html.ActionLink("Delete", "Delete", "Listing", listing.Guid, new { onclick =…
Subby
  • 5,370
  • 15
  • 70
  • 125
3
votes
2 answers

Set Html.ActionLink's Visibility, Best approach ?

I have boolean value in my model and I return this model to view. I want to control actionlink visibility with this value. I found two example like this: First @if (Model.UserCanCreate) { @Html.ActionLink("Create New", "Create") } Second
AliRıza Adıyahşi
  • 15,658
  • 24
  • 115
  • 197
3
votes
2 answers

Rewrite an asp.net mvc ajax actionlink as a jquery/ajax statement

How would you rewrite this statement using Jquery + Ajax only? This code displays a link. When I click on it a view is returned into the StuffPanel id. @{ AjaxOptions options = new AjaxOptions { InsertionMode =…
msfanboy
  • 5,273
  • 13
  • 69
  • 120
2
votes
1 answer

Theming an MVC3 ActionLink so that all links have a consistent width

We are using posts and gets, which out-of-the box appear as links (gets) and buttons (posts). In an effort to provide a pleasant and consistent look to the UI, we have button themed all UI click interactions to look the same using css: .minimal { …
Geoff
  • 69
  • 7
2
votes
3 answers

ASP.Net MVC AJAX link not working

I have this link, in an effort to implement AJAX log on, on my page: <%= Ajax.ActionLink("Log On", "LogOn", "Account", new AjaxOptions { UpdateTargetId = "lll", Confirm = "blah"}) %> There's a div with id lll nearby. When I click the link,…
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622
2
votes
1 answer

Creating Action Links With Special Characters

I'm trying to create an action link which has a url parameter with a period. I can do this the following way:
ek_ny
  • 10,153
  • 6
  • 47
  • 60
2
votes
2 answers

MVC Ajax with Ajax.ActionLink

I'm trying to create simple Ajax call, but after clicking the link I get a blank page with "Test" string in top left corner: In my Details view I have: @Ajax.ActionLink("test", "AddPositive", new AjaxOptions() { UpdateTargetId = "countDiv" })
mishap
  • 8,176
  • 14
  • 61
  • 92
2
votes
1 answer

MVC3 Ajax.ImageActionLink within WebGrid

I am trying to populate a WebGrid cell with an image that will open up a "Details" popup based on which row is selected. Currently, I have this for the details column: grid.Column(header: "Details", format: (item) => @Ajax.ActionLink("pop",…
Sean C
  • 23
  • 1
  • 4
2
votes
1 answer

Telerik MVC Grid Control Additional Column with ActionLink

Hi I am Using Telerik MVC Grid Control in my MVC 3.0 Project I am trying to add Additional Column to the Grid columns.Template(e => @Html.ActionLink("Edit", "Action", "Controller", new { id = e.ID}, new { @class = "standard…
HaBo
  • 13,999
  • 36
  • 114
  • 206
2
votes
3 answers

ajax.actionlink shows different urls on server and visual studio

I am trying to use ajax.actionlink to remove the number of items in my shoppingcart. I added an ajax.actionlink which works fine on my local computer (with Visual Studio 2010), but not on my server. Here is the code: @Ajax.ActionLink("-", …
2
votes
2 answers

How to specify controller in ActionLink html helper in C#

I have a web application developed in ASP.NET MVC3 with C# and Razor. I would like to call a specific Action Method of a specific Controller by using the ActionLink HTML helper. I know that the second parameter of ActionLink specifies the Action…
CiccioMiami
  • 8,028
  • 32
  • 90
  • 151
2
votes
1 answer

ASP.NET Core MVC ActionLink arguments

I have a actionlink button (MVC) witch creates an PDF file witch works fine: @Html.ActionLink("PDF", "CreatePDF", new { id = item.ConnectionID }, new { @class = "btn btn-primary" }) Now I want the button to enforce opening the PDF in a new tab. No…
2
votes
1 answer

ASP.NET MVC, Actionlink

I am revisiting MVC after some time I am facing some weird errors, which I just can't seem to solve. @Model List @using StockEdgeTest.Models @{ ViewBag.Title = "Department List"; }
2
votes
1 answer

Ajax.ActionLink with multiple triggers

I have a webpage with a large number of links that all need to call the same controller action using AJAX. Each link differs by only a single parameter. Right now I'm creating an Ajax.ActionLink for each one, but this produces very verbose HTML. How…
Bobbler
  • 633
  • 1
  • 7
  • 21
2
votes
1 answer

Problem with Ajax.ActionLink AjaxOptions Callbacks (ASP.NET MVC 3)

I have an Ajax.ActionLink inside a PartialView like so: @Ajax.ActionLink(Model.IsVisible ? "Disable" : "Enable", "ToggleVisibility", "Review", new { area = "Admin", id = Model.Id }, new AjaxOptions { HttpMethod = "POST", OnComplete =…
RPM1984
  • 72,246
  • 58
  • 225
  • 350