Hi all,
this may or may not be possible (and could well be in the docs but i've just missed it).
How do i structure a Url.Action() inside my view using T4MVC that will allow me to use jQuery selectors. I've been attempting the following (in my javascript) without success:
function cancelHoldBooking() {
var url = '<%= Url.Action(MVC.FundProperty.CancelLock($("#propertyid").val())) %>';
// other code omitted for brevity
}
i am able to successfully do the following:
function cancelHoldBooking() {
var url = '<%= Url.Action("CancelLock", "FundProperty") %>';
url += "?id=" + $("#propertyid").val();
// other code omitted for brevity - in this case
// **I could of course have used the**:
// var params = {id: $('#propertyid').val()};
// **object**
}
i know this will be a 'doh' moment when the answer arrives, but for the life of me, I can't figure this out!!
cheers...
[edit] - i would just add that if i omit the MVC.FundProperty.CancelLock() id paramater and attempt to just send the params object via the $ajax call, then the compiler complains about the missing parameter in the call. i can't therefore by-pass the javascript mish-mash by calling using the $ajax params object with no parameters inside the CancelLock() call. frustrating :(