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
2 answers

Convert an HTML button to ActionLink

I have an html button setup and functioning with a set range of required properties that I'd like to convert to a text-based link instead. Additionally, so I can familiarize myself with working html helpers and intellesense I'd like to see how to…
justSteve
  • 5,444
  • 19
  • 72
  • 137
0
votes
1 answer

permissions aware (icon) action links for all models: how?

I have several models, for which I want to show some common icons for action links (new, details, edit, delete) and some specific ones for certain models only; these iconlinks must only be showed when the user has permission to perform the action.…
giorgian
  • 3,795
  • 1
  • 30
  • 48
0
votes
1 answer

Ajax.ActionLink parameter from DropDownList

I have the following view part:
@Html.LabelFor(model => model.Type)
@Html.DropDownListFor(model => model.Type, ElangWeb.Helpers.ModelHelpers.GetExerciseTypes())
I want to…
niao
  • 4,972
  • 19
  • 66
  • 114
0
votes
1 answer

html.ActionLink links not returning expected value?

I have the following ActionLink Html.ActionLink("Home", "Index", "Home", New With {.class = "tab"}) But it creates the following Link in the address bar http://localhost:1028/?Length=4 as opposed to what I expect it to be as…
LiamGu
  • 5,317
  • 12
  • 49
  • 68
0
votes
1 answer

Concatenate within ActionLink with code

I am trying to concatenate the c.name with Response.Write(counts[c.ID]); Basically, in the
  • , I want it to be "Category name (x)". So, basically shove the if statement after the c.name. How can this be done?
  • <%:Html.ActionLink(c.Name,…
  • macecase
    • 147
    • 2
    • 12
    0
    votes
    1 answer

    MVC .NET 4 MapRoute + ActionLink or RouteLink issue

    Okay, so here's the deal. I've got controller called "Hotel" with view called "Index", where I'm trying to produce code allowing me to generate links in form of: ../Hotel?id=1 with ID passed as argument. To do so, I've tried using…
    0
    votes
    0 answers

    Html ActionLink works fine on local machine, 'Resource cannot be found' on production server

    I'm using MVC 4 on both local and production. From my Index.cshtml file I have a simple link: @Html.ActionLink("Click to send an email", "Email", "Home"); where Email is defined in my HomeController as: public ActionResult Email() { // send…
    TonyMack
    • 9
    • 6
    0
    votes
    1 answer

    How to make an action link with a URL for a previous directory?

    So I have this action link @Html.ActionLink("Logout","LogoutConfirmation","Login") which takes me to a url like: mysite.com/myaccount/Login/LogoutConfirmation however the folder isnt located in "myaccount" its just that is my current location on…
    Ben
    • 187
    • 3
    • 12
    0
    votes
    1 answer

    MVC:replacing HTML.ActionLink with ahref

    Earlier I had ActionLink <%: Html.ActionLink("Add Race", "AddRace", new {eventId = Model.EventId,fleetId=Model.SelectedFleet.ID}) %> on my page..and it is working fine. But now my requirement is it must check if some there is some data…
    Mayank Pathak
    • 3,621
    • 5
    • 39
    • 67
    0
    votes
    1 answer

    C#/ASP.NET ActionLink/Functions/Wrong Linking

    Users upload a file which then gets reviewed by a doctor. The doctor then uploads his file stating their remarks and then the user can read the file. At least, they SHOULD be able to. When the doctor uploads a file a new directory is created inside…
    0
    votes
    3 answers

    How to submit form by ActionLink

    i need help with ASP MVC. I have: <% using (Html.BeginForm(null,null,FormMethod.Post)) {%>

    . . . <%=Html.ActionLink("Save", "Index")%>

    <% }…
    Petr Pražák
    • 191
    • 2
    • 10
    0
    votes
    2 answers

    How do I pass a textbox (DatePicker) variable to my controller using Html.ActionLink?

    I have a link that opens a pdf in a new window, without leaving the page. I had this link working...