khorsandreza
یک شنبه 21 دی 1393, 18:19 عصر
سلام من می خواهم با دستور جی کوئری زیر ک پروسیجر سمت سرور را به این صورت اجرا کنم وقتی صفحه من تغییر اندازه میدهد پروسیجر اجرا شود.
ایا روش کار درست است
دستور جی کوئری
<script>
$("document").ready(function () {
$(window).resize(function () {
var param = "{'xrow':'" + "2" + "'}";
alert(param);
$.ajax({
type: "POST",
url: "UC_Content.ascx/setdatalistcol",
data: param,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
$("#contet").html("done");
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
}
});
});
});
</script>
پروسیجر سمت سرور
protected void setdatalistcol(string xrow)
{
.
.
.
.
DataList1.RepeatColumns = int.Parse(xrow);
.
.
.
}
ایا روش کار درست است
دستور جی کوئری
<script>
$("document").ready(function () {
$(window).resize(function () {
var param = "{'xrow':'" + "2" + "'}";
alert(param);
$.ajax({
type: "POST",
url: "UC_Content.ascx/setdatalistcol",
data: param,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
$("#contet").html("done");
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
}
});
});
});
</script>
پروسیجر سمت سرور
protected void setdatalistcol(string xrow)
{
.
.
.
.
DataList1.RepeatColumns = int.Parse(xrow);
.
.
.
}