Is it possible to create Ajax.ActionLink which has instead of text, the whole DIV?
I’d like to map div on Ajax.ActionLink
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.
I don’t think that this will work using the standard MVC Ajax scripts. I believe that the MVC javascript is created to use an
<a>element by default. On a different note, embedding adivtag within an<a>is not valid XHTML. What are you trying to achieve?Using Jquery is probably the easiet way you want to go. As an example:
However, if you are dead set on using MS Ajax, to work with divs, you need to possibly look at the
Sys.Mvc.MvcHelpers._asyncRequestfunction and do some of your own re-wrapping to make it usable. I have not tried or tested this, so use at your own risk. (Stick with the Jquery, there is far better help and support available.)