PDA

View Full Version : سوال: مشکل در ارسال پارامتر باjquery



fateme1
یک شنبه 18 دی 1390, 14:56 عصر
سلام
من این کدو نوشتم

$(function () {
$('#search').click(function () {
var family = $('#txtFamily')
var Condition = '';
if (family.val().length > 0)
Condition ='family=' + family.val();
text='{Condition:"' + Condition + '"}';
$.ajax({
type:'POST',
url:home.aspx/Request_GetAll' (http://barnamenevis.org/home.aspx/Request_GetAll'),
data: text,
contentType:'application/Json; charset=utf-8',
dataType:'Json',
beforeSend: function () {
alert("begin");
},
success:function (msg) {
alert("success" + msg);
$("#test").load("htmes/Request.htm");
},
error: function (e) {
alert("error" + e.d);
},
complete: function (c) {
alert("complete");
}

});

});
});
تا با فرستادن فامیل به پایگاه داده سطرهای با اون فامیل رو بر گردونه
اما خطایundefined xmlhttp request میده
کسی میدونه چرا؟
آیا باید تنظیمات خاصی توی ویژوال استادیو روی پروژم انجام بدم؟
اینم وب متدم

[WebMethod]


publicstaticstring Request_GetAll(string family)


{


RequestList list = newRequestList();

list =




Request_DB.Request_get(family);


StringBuilder sb = newStringBuilder();


foreach (var item in list)


{

sb.Append(




"<tr ItemID='" + item.ItemId + "'>");


sb.Append(



"<td><img src='../Image/delete.png' ItemID='" + item.ItemId + "'/></td>");


sb.Append(



"<td><img src='../Image/edit.png' ItemID='" + item.ItemId + "'/></td>");


sb.Append(



"<td>" + item.name + "</td>");


sb.Append(



"<td>" + item.mobile + "</td>");


sb.Append(



"<td>" + item.NameCity + "</td>");


}


return sb.ToString();


}

tux-world
سه شنبه 20 دی 1390, 13:06 عصر
اینی که نوشتید رو توضیح میدین؟

<a href="http://barnamenevis.org/home.aspx/Request_GetAll%27" target="_blank">url:home.aspx/Request_GetAll'</a>,
سایت برنامه نویس که php هستش نه aspx. در ضمن شما دسترسی دارید؟