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

Using @HTML.Action with Parameters to C# controller

In View, the user will check 1 or more names from what's displayed ...
@if (Model.evModel.Participants != null) { foreach (var fi in…
BlueDiamond
  • 1
  • 1
  • 2
0
votes
2 answers

Java Server Faces equivalent to Html.ActionLink

I am using NetBeans for a Web Application in Java EE. I have one controller for an absence entity class (absenceController) and one controller for an employee entity class (employeeController). I am able to get to the employee creation page via any…
Ali
  • 109
  • 7
0
votes
1 answer

ASP.NET MVC passing an ID in an ActionLink

how can I pass an id through actionlink without this being shown through the url? @Html.ActionLink("Edit", "Edit", new { id = item.Id}) | The URL appears to me the next picture…
0
votes
1 answer

Passing dynamic Id to AjaxActionLink ASP.NET MVC 5

I have ajax action link in my view : @Ajax.ActionLink("ShowWithFilter", "ShowCompanyData", null, new { StateId = "x", CityId = "y" }, new AjaxOptions { …
user3697231
  • 33
  • 1
  • 8
0
votes
2 answers

how to apply action link to html block

@Html.Label(exam.ExamName,new{@style="cursor: pointer;color: #FF8627 "})
vaibhav shah
  • 4,939
  • 19
  • 58
  • 96
0
votes
1 answer

How to set the value of a select field through htmlAttribute in MVC 5?

I have an ActionLink defined as in this: @Html.ActionLink("Write a review", "Create", "Reviews") The point is that, when it redirects to the Create view of the Reviews controller, there is a select field with the id of BusinessID. Therefore, I want…
user1726549
0
votes
1 answer

Html.Action in a shared partial view tying into a shared controller how to route

I have a controller in the shared path \controller\blah.cs that a partial view is talking to \views\shared\SomeDir\blah.cshtml All is good except when I try to make a @Html.Action link that gets to that shared controller: …
0
votes
1 answer

Why does @Html.ActionLink not use RouteData

I have the simplest setup: An empty asp.net MVC application with one controller: public class HomeController : Controller { public ActionResult Edit(int id) { return View(); } public ActionResult Commit(int id) { …
Wolfgang
  • 2,188
  • 1
  • 25
  • 24
0
votes
2 answers

Pass Model from View To Controller Using ActionLink

what is the best way to pass model data from View to Controller using actionLink. actually my action link is download link and i want to pass report model as it contains datatable information. private void DownloadReport(ReportModel rptModel) …
shujaat siddiqui
  • 1,527
  • 1
  • 20
  • 41
0
votes
1 answer

ASP.NET MVC 4 Send a model - View to Controller

I started an ASP.NET MVC 4 Project. I have a problem to communicate between View and Controller with my model. I know how to send a List to the view but I want to retrieve this model from the view to send it to the controller. In my controller : …
user3820903
  • 23
  • 1
  • 5
0
votes
1 answer

a href and html.actionlink size not same

If i use below , button display bigger. Add If i use below , button display smaller than above code. @Html.ActionLink("Add", "xx", "Law", new { _lawfileid = -1, baseappid =…
user3722851
  • 147
  • 4
  • 13
0
votes
2 answers

how can I add h3 on actionlink

My first ActionLink is ok. But how can I add h3 tags ? @a.Title @Html.ActionLink(@a.Title, "Index", "Channel", new { @a.Id }, null) How can i do actionlink this link?
user3583183
  • 91
  • 1
  • 5
0
votes
1 answer

MVC Pass Paramater from ActionLink to View to return Recordset

I would like to pass a value from a link to a View and display the fields of the single record on the page. Lets say I have @Html.ActionLink(item.Title, "Article/"+@item.ID, "News") which outputs /News/Article/1, I would need a Controller called…
iggyweb
  • 2,373
  • 12
  • 47
  • 77
0
votes
0 answers

MVC Routing Structure and SEO friendly URLs

I have a MVC project that has a number of views in the Views/Home folder to which are currently accessed as /Home/About, /Home/Contact, etc... but these are summary pages with multiple content sections on each page. I need to link to an…
iggyweb
  • 2,373
  • 12
  • 47
  • 77
0
votes
3 answers

Input button in MVC asp.net

How to use Input button for @Html.ActionLink? In my cshtml I have this code:
@Html.ActionLink("Back to menu", "HomeController")
Now I whant to use instead hyperlink button (Back to menu), input submit button, so this button:
Daniel K Rudolf_mag
  • 287
  • 2
  • 5
  • 18