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

How can I use ajax actionlink in WebGrid's header

I'd like to sort the data in WebGrid by clicking the header of the column with some other parameters post to the controller, but the WebGrid's autosorting supply a fixed link on the column header with only two parameters. I found some way to change…
0
votes
2 answers

How can I chage the color of the link in Html.Action link, when the mouse is over the div?

I am using MVC3. I have a table and an Html.ActionLink inside of it. I have already set the text decoration for none, but the link is still blue. I change the table:hover background-color and the color(of the text), and when I put the mouse over the…
0
votes
1 answer

Html.ActionLink in Webgrid returns empty string

I'm trying to add an ActionLink to a webgrid column but am running into problems. If I add the action link like so, it works and links to the main UserDetails page: grid.Column(header: "", format: (item) => Html.ActionLink("Details", "UserDetails",…
Ento
  • 43
  • 1
  • 6
0
votes
2 answers

How to pass query string with ActionLink?

Hi, I am using ASP.NET MVC 3 and I need to generate a URL like this : MyURL.se/?CS.C2=113 I have tried this : <%= Html.ActionLink(subItem.Name, "List", "Ad", new { CS.C2=subItem.Id}, null) %> But this will throw a : CS0746: Invalid anonymous type…
Ivy
  • 2,285
  • 4
  • 24
  • 29
0
votes
1 answer

Html.ActionLink and loading image display?

I m showing a jquery ui dilog with link below. dialog opens 2 seconds later and I want to show a loding image until it opens. How can I do this? @Html.ActionLink("Ekle", "AddCustomer", "Customer", routeValues: null, htmlAttributes: new { id =…
AliRıza Adıyahşi
  • 15,658
  • 24
  • 115
  • 197
0
votes
1 answer

html.actionlink routevalues error

recently I have been trying to add a link that allows people to delete their own comments on my website. I have followed the advice of the answer of the question asked here. This is what my code looks like now: @Html.ActionLink("x","DeleteComment",…
user1504679
0
votes
1 answer

MVC @Html.ActionLink ID for hyperlink

I need to be able to create an id for a hyperlink. I have the following: @Html.ActionLink("Delete", "Delete", new { id = @item.ID}, new {id = "deletelink"}) I was wondering, if there is any better way of doing this? Note that the id will be…
Nate Pet
  • 44,246
  • 124
  • 269
  • 414
0
votes
4 answers

Html.ActionLink problems

I am trying to provide a link to filter search results. <%= Html.ActionLink("Filter Results", "Index", new { page = Model.RestaurantList.PageIndex(), searchText = Model.SearchText, useFilter = true, filterOption = Model.FilterOption, filterText…
ddd
  • 1,399
  • 3
  • 19
  • 44
0
votes
1 answer

Pressing an asp.net mvc Ajax.ActionLink with Insert into RenderBody() causes an endless loop

I have these ActionLinks in my Main Index View:

@Ajax.ActionLink("Releases", "Index", "Release", new AjaxOptions { InsertionMode = InsertionMode.Replace, UpdateTargetId = "ContentPanel" })

@Ajax.ActionLink("Templates", "Index", "Template",…

Pascal
  • 12,265
  • 25
  • 103
  • 195
0
votes
1 answer

MVC3 ActionLink with search function

I want to make search function through the link. Currently, I have search box in home page. It is working the search box. However, I don't know how to pass the some parameters to Search method in controller. When I put like this coding, searchString…
wholee1
  • 1,491
  • 13
  • 34
  • 51
-1
votes
1 answer

How to handle the ID from an actionlink to show this in a readonly textbox

I have a lot of tables. Each table has an incremental int ID and a company guid id. I made an with the company guid as id param. Like this: @Html.(@item.Bedrijfsnaam.ToString(), "Edit", "BedrijfsGegevens", new { id = (Guid)item.Bedrijfsnummer },…
1SeoAdvies
  • 103
  • 1
  • 2
  • 10
-1
votes
1 answer

asp.net, how can i go from localhost/Controller1/Index to localhost/Controller2/Details/{ID}?

I am trying to go from https://localhost:44383/Reservations/Index to https://localhost:44383/Bikes/Details/{Id} But I don't know what html actionlink i need. I thought this was the right one: @Html.ActionLink("Details", "Details", "Bikes", new { Id…
-1
votes
1 answer

Parameter name is null when passing from ActionLink to Controller

I have a strange problem: I have an ActionLink in the view : @Html.ActionLink("Signature", "DownloadDocumentFile", "Home", new { fileName = "Sem Szabi.jpg" }) Although the fileName is set, in the controller method the fileName is always…
Kar
  • 311
  • 3
  • 7
  • 16
-1
votes
1 answer

How to Pass id value of actionlink to javascript function in my Asp.net Mvc Project

I have a table for departments. Right now I created controller for every department and every department have index.cshtml. But they use the same functions. I hard coded their departmentId in every index page. for example for department IT with…
Helen Tekie
  • 515
  • 1
  • 6
  • 23
-1
votes
1 answer

ASP.NET MVC dynamic Actionlinks for menu show length instead of actual value

I want to have a dynamic value. I got this code but it does not work. it shows length in url instead of parameter i've given: @model IEnumerable
@foreach (var item in Model) { @Html.ActionLink(item.Name,…
Amsel
  • 107
  • 1
  • 13