uthman
سه شنبه 30 مهر 1392, 14:11 عصر
سلام.من در asp.net برای درج اطلاعات از کد زیر استفاده میکنم .
function TotalParticipation(uid) {
var xmlhttp;
if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
}
else {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
}
}
xmlhttp.open("post", "page2/p2.aspx?userid=" + uid, true);
xmlhttp.send();
}
حالا من میخوام اگر در صفحه ای که insert انجام میشه پشت پرده و خطا داد به کاربر بگم که انجام نشد در غیر اینصورت بگم با موفقیت انجام شد.
لطفا راهنمایی کنید.
function TotalParticipation(uid) {
var xmlhttp;
if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
}
else {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
}
}
xmlhttp.open("post", "page2/p2.aspx?userid=" + uid, true);
xmlhttp.send();
}
حالا من میخوام اگر در صفحه ای که insert انجام میشه پشت پرده و خطا داد به کاربر بگم که انجام نشد در غیر اینصورت بگم با موفقیت انجام شد.
لطفا راهنمایی کنید.