here is my web service :
public class Header : System.Web.Services.WebService {
public Header () {}
[WebMethod]
public string GetArchive(string PageID)
{
StringBuilder sb = new StringBuilder();
BusinessRules.News news = new BusinessRules.News();
BusinessObject.NewsItemList newsList =
news.GetListbySectionID(int.Parse(PageID));
foreach (BusinessObject.NewsItem item in newsList)
{
sb.Append(item.ID + " : " + item.Date);
}
return sb.ToString();
}
}
where
<body>
<form id="form1" runat="server">
<div>
<div runat="server" id="Content">
</div>
<div>
<a id="LinkBtnAll" href="#">View</a>
</div>
</div>
</form>
</body>
and
<script type="text/javascript">
$(document).ready(function () {
var ParamValue = $.getUrlVar("id");
$('#LinkBtnAll').click(function () {
$.ajax({ type: "POST",
url: "Services/Header.asmx/GetArchive",
data: "{'PageID'," + ParamValue + "}",
contentType: "application/json; charset=utf-8",
dataType: "json",
async: true,
cache: false,
success: function (msg) {
$('#Content').text(msg.d);
}
})
return false;
});
});
</script>
it doesn't work is anyone who can help me ?