jqueryUI 选项卡的 HTML。
<div id="lodg_tabs" class="tabs">
<ul>
<li><a href="#tabs-1">Add/Remove</a></li>
<li><a href="mand_lodg_upd.aspx">Update</a></li>
</ul>
<div id="tabs-1" class="forms">
<h3 align="center">Mandate Lodgment</h3>
<form name="mand_lodg" id="mand_lodg" method="post">
将参数发送到加载“mand_lodg_upd.aspx”的选项卡的ajax代码
$("#lodg_tabs").tabs({
select: function (event, ui) {
var res = valid('mand_lodg');
$(this).tabs("option", { ajaxOptions: { data: $("#mand_lodg").serialize()} });
},
ajaxOptions: {
type: 'POST',
error: function (xhr, status, index, anchor) {
$(anchor.hash).html("An error has been encountered while attempting to load this tab.");
}
},
cache: false
});
后面的c#代码
Response.Write(Request.Form["zone"] + Request.QueryString["zone"]);
zone.Value = Request.Form["zone"];
loc.Value = Request.Form["loc"];
date.Value = Request.Form["date"];
输出:输出正常,文件正在选项卡中加载
问题:但是用ajax传递的参数即
$(this).tabs("option", { ajaxOptions: { data: $("#mand_lodg").serialize()} });
区域位置和日期在后面的 c# 代码中为空