Use T4MVC to fill string

Jun 30, 2013 at 5:48 PM
I'm trying to do something like this:

return toJSON(new { redirect = MVC.Orders.Order(orderID) });

The trouble is MVC.Orders(orderID) is returned as a T4MVC object
T4MVC_System_Web_Mvc_ActionResult

How do I get it to return the string?

Thanks
Coordinator
Jun 30, 2013 at 5:53 PM
Not sure I understand what you're trying to achieve. Can you write it out using standard MVC (no T4MVC)? That will help clarify, and I can see if I can help you convert it to T4MVC.
Jun 30, 2013 at 6:17 PM
I was trying to get the URL representation of the ActionResult.
I've just figured out that what I was after was
Url.Action(MVC.Orders.Order(orderID))

Thanks
Coordinator
Jun 30, 2013 at 6:46 PM
Yes, that's correct. The pattern of calling Url.Action is the same as with standard MVC.