Код: Выделить всё
var pageurl = '';
$('document').ready
(
function () {
$("#ShowButton").click
(
function (e) {
e.preventDefault();
$.ajax
(
{
type: 'POST',
URL: pageurl,
async: "true",
success: function (x) {
alert("Done Successfully with " + x.msg);
},
error: function (e) { alert("The call got failed due to " + e.msg); }
}
);
//$("#First").html("").append(data);
}
);
}
)
Код: Выделить всё
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace test_with_ajax
{
public partial class WebForm1 : System.Web.UI.Page
{
[WebMethod]
public static void Show()
{
WebForm1 t = new WebForm1();
t.TextBoxName.Text = "Sarthak";
t.TextBoxID.Text = "66";
}
}
}
Подробнее здесь: https://stackoverflow.com/questions/273 ... te-changes
Мобильная версия