Back to list
Views:   20.6K
Replies:  1
Archived

How to include a JavaScript call in an @Html.ActionLink?

Hi:
 
I have the following code for an ActionLink:
@Html.ActionLink("TextLink", "Action", "Controller", 
                 new { name= "Name1",address="Address1" },null )
How do I include an onclick JavaScript function into this?  

Regards
Ajeesh
 
Ajeesh John, Feb 28, 2013
Reply 1
I found this on StackOverflow:

<%= Html.ActionLink("linky", "action", "controller", new { onclick = "someFunction();"}) %>


Orlando Owens, Mar 12, 2013


Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Licensing       EULA       Sitemap      
© Data & Object Factory, LLC.
Made with    in Austin, Texas.      Vsn 1.2.2