發表文章

目前顯示的是有「ASP.NET WebForm」標籤的文章

ASP.Net WebForm JQuery 呼叫 CodeBehind方法 (手動postback)

ASP.Net WebForm JQuery 呼叫 CodeBehind方法 (手動postback) JQuery $('#myTextBoxB').keypress(function (e) { if (event.which == 13) { blockUI(); var param = '{ ' + '"Event":"keypress", ' + '"A":"' + $("#myTextBoxA").val() + '", ' + '"B":"' + $("#myTextBoxB").val() + '"' + ' }'; //第1個參數 eventTarget, 第2個參數 eventArgument __doPostBack("<%=this.myTextBoxB.ClientID%>", param); } }); Code Behind protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { } else { string eventTarget = Request.Params.Get("__EVENTTARGET"); string eventArgument = Request.Params.Get("__EVENTARGUMENT"); ParamData PData = Newtonsoft.Json.JsonConvert.DeserializeObject<ParamData>(p_EventArgument...