Questions tagged [html.actionlink]

html.actionlink is an HTML Helper in ASP.NET MVC framework. It enables to render an HTML link by using HTML.ActionLink().

With MVC, HTML helpers are much like traditional ASP.NET Web Form controls.

Just like web form controls in ASP.NET, HTML helpers are used to modify HTML. But HTML helpers are more lightweight. Unlike Web Form controls, an HTML helper does not have an event model and a view state. MVC includes standard helpers for the most common types of HTML elements, like HTML links and HTML form elements.

285 questions
0
votes
1 answer

Html.ActionLink() image background mvc

How to set an image background for a Html.ActionLink()? My code: @Html.ActionLink("Home", "Index", "Home", new {@data_transition = "slide"})
taia
  • 61
  • 3
  • 12
0
votes
2 answers

How do I create an ActionLink to the Index action of a different controller?

How do I change the following code to produce the proper URL? Note: The ActionLink is being produced from a different controller than DomainsController. @Html.ActionLink("Domains", "Index", "Domains", new { id = item.Name }, null) The goal is to…
alockrem
  • 767
  • 3
  • 9
  • 23
0
votes
1 answer

Calling PostMethod from HTML.Actionlink

Hi I am fairly new to MVC and facing a issue. I have a View which lists all the countries having just 2 columns I want column headers clickable and should sort on clicking on it I have shown my Controller & view code below and I expect that when…
0
votes
2 answers

Html.ActionLink Title parameter as test + value

I have this line but not sure about the + string part. It is not correct as it is now:

<%: Html.ActionLink("TUK-JS-KPI-WE-" + ((DateTime)Eval(ViewBag.jobSortedReportDate)).ToString("yyyy-MM-dd"), "TradeUKKPIReportInstructions", "Report",…

charlie_cat
  • 1,830
  • 7
  • 44
  • 73
0
votes
2 answers

Applying a class to some link text

We've recently added an extension method (string.Highlight(string target)) to wrap occurences of the target text with , and are using it for all text displayed on the page. The initial issue we ran into was that…
yoozer8
  • 7,361
  • 7
  • 58
  • 93
0
votes
1 answer

ASP.NET Mvc Jquery ui does not work?

CustomerController.cs public ActionResult AddCustomer() { return ContextDependentView(new _Customers()); } public ActionResult EditCustomer(int sno) { return ContextDependentView(entity.Customers.Where(x => x.sno ==…
AliRıza Adıyahşi
  • 15,658
  • 24
  • 115
  • 197
0
votes
1 answer

Redirect view with Html.ActionLink

I have the following problem: I make the call to the method of a controller, it receives a parameter. The code is as follows: @Html.ActionLink("Preview", "ReportExecution", "Report", new { reportName = ViewBag.docLiquidation }, null) This…
jorcast
  • 15
  • 1
  • 7
-1
votes
1 answer

I want to delete a row in my database with the @Html.ActionLink Delete but its not working. What am I doing wrong?

It can write out the cv.name, it also connects to the database. But I'm doing something wrong with a delete action. cshtml: @{ foreach( var cv in Model.GetCVs( username)) {

Name:…

Lilla
  • 1
-1
votes
1 answer

How to use class in ActionLink in asp.net mvc?

Here The upper line is in html while lower is in asp.net but I am not getting the output from lower line as the upper gives. The output with upper line is first one and the output of lower line is second one. Why I am not getting the desired…
Rizwan Gohar
  • 57
  • 2
  • 11
-1
votes
1 answer

Html.ActionLink with more than one route value

I have a problem with Html.ActionLinkmethod. If I use @Html.ActionLink("Some text", "MyAction", "MyController", new { id = 1234 }, null) I get a link with this href: http://web.com/MyController/MyAction/1234 That is fine, but if I use more route…
Jon
  • 891
  • 13
  • 32
-1
votes
2 answers

MVC 4 Pass parameter from ActionLink (type: HttpGet) to Controller

I am new to Asp.net MVC and currently I want to pass some parameter (selected dates) to the controller when user click the action link button, below is the action link and date picker field code,
Md Aslam
  • 1,228
  • 8
  • 27
  • 61
-1
votes
1 answer

Html.ActionLink doesn't call at all

I am having some problems solving this. The thing is, this is the only place it doesn't work, everywhere else in my project it works just fine and it's all the same. here is my link: @Html.ActionLink("Edit",…
Spluf
  • 810
  • 1
  • 11
  • 26
-1
votes
1 answer

Pass an id and get it from actionLink to view page

I have this ActionLink into view named catalog @Html.ActionLink("Formations", "Index", "Formation", new { id = item.Id },null) and I want to get the list of formations of this catalog id. How can I do this ? In my database I have two tables :…
dhouha babay
  • 73
  • 3
  • 13
-1
votes
1 answer

Html.ActionLink and its binding

How ASP.NET MVC understand what action method exactly it should use in Html.ActionLink("text","myAction")? Why I dont need to use the name of controller? Also, I know, another version of this method exists (with controller as parameter). What is…
-2
votes
1 answer

Sending Json data to @Html.Actionlink() in Jquery in MVC4

I'm binding html table with json data with the help of jquery. And I've successful done that. Also want to bind actionlink through jquery into the table with passing an Id coming from Json Data. But getting error. I've searched for it also gone…
Krunal Patil
  • 3,666
  • 5
  • 22
  • 28
1 2 3
18
19