Is there any way i can retrieve the values of actionlink in jquery?
For example: I would want the values 4 and “abc” from
html.actionlink("action","controller",new {id=4,name="abc"},new {@class="a"}) in jquery.
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no equivalent of ActionLink accessable from javascript. A possible solution is based on string replacement. You prepare the link and send it through your view. In javascript then replace its dynamic parts. See this answer:
ASP.NET MVC ActionLink in jquery-tmpl template