Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- routes.MapRoute(
- "Products AJAX",
- "Products/Ajax/{action}",
- new { controller = "Products" }
- );
- routes.MapRoute(
- "Product",
- "Products/{id}",
- new { controller = "Products", action = "ViewProduct", id = "1001" }
- );
- public class ProductsController : Controller {
- public ContentResult GetStatus()
- {
- return new ContentResult()
- {
- Content = "Status is OK at " + DateTime.Now.ToLongTimeString()
- };
- }
- }
- <%= Ajax.ActionLink("Update Status", "AJAX/GetStatus", new AjaxOptions { UpdateTargetId = "status" })%>
- MapRoute(
- "Products AJAX",
- "Products/Foo/{action}",
- new { controller = "Products" }
- );
- <%= Ajax.ActionLink("Update Status", "GetStatus", new AjaxOptions { UpdateTargetId = "status" })%>
Add Comment
Please, Sign In to add comment