This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DefaultController : Controller | |
{ | |
public ActionResult Index() | |
{ | |
Response.Cookies.Add(new AccountIdCookie(12345)); | |
return View(); | |
} | |
} | |
class AccountIdCookie |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@{ | |
var ajaxOptions = new AjaxOptions { UpdateTargetId = "form" }; | |
var htmlAttributes = new { id = "form", data_ajax_mode = "replacewith" }; | |
} | |
@using (Ajax.BeginForm("Index", null, ajaxOptions, htmlAttributes)) | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |