using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Text; namespace TypeScriptExamples.AjaxServerSide { public partial class ModelDeleteStudent : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { int primaryKey; Response.ContentType = "text/plain"; Response.ContentEncoding = Encoding.UTF8; if (int.TryParse(Request.Form["id"], out primaryKey) == false) { // For this example we just return an ID // of zero. primaryKey = 0; } Response.Write(string.Format("id={0}", primaryKey)); } } }