0514-86177077
9:00-17:00(工作日)
在ASP.NET中應(yīng)用Ajax的格式如下:
前臺代碼(用JQuery庫)
$.ajax({ type: "POST", async: true, url: "../Ajax/ajax.ashx", dataType: "html", data: null success: function (result) { //do successful sth }, error: function (XMLHttpRequest, textStaus, errThrown) { //do error sth } })
Ajax(一般性處理程序)中代碼如下:
public void ProcessRequest (HttpContext context) { context.Response.ContentType = "text/plain"; string result = "Hello World"; context.Response.Write(result); }
以上所述是小編給大家介紹的ASP.NET中Ajax使用方法的相關(guān)知識,希望對大家有所幫助,如果大家想了解更多內(nèi)容,敬請關(guān)注腳本之家網(wǎng)站!
標(biāo)簽:清遠 甘肅 聊城 中衛(wèi) 臨夏 慶陽 海西
上一篇:ASP.NET自帶對象JSON字符串與實體類的轉(zhuǎn)換
下一篇:VS2013的Browser Link引起的問題
Copyright ? 1999-2012 誠信 合法 規(guī)范的巨人網(wǎng)絡(luò)通訊始建于2005年
蘇ICP備15040257號-8