【发布时间】:2014-05-21 16:36:32
【问题描述】:
JS代码:
function save( ref, text){
$.post("save.aspx", {cc:"us", ref:ref, text:text}, function(data){
$("[data-ref='"+ref+"'] .loader").animate({opacity:0},500,function(){
$(this).parent().removeClass("saving");
$(this).remove();
});
});
}
CS文件代码:
public partial class save : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// $_REQUEST['cc'];
// HttpContext.Current.Response
string strcc = Request.Form["cc"];
string strRef = Request.Form["ref"];
string strtext =Request.Form["text"];
}
}
无法获取从 JS 代码传递到下一页的值,我在这里做错了什么?
【问题讨论】:
-
如果你把你的帖子参数放在引号之间会发生什么:
{"cc":"us", "ref":ref, "text":text} -
@ashish 我认为你是否引用并不重要。
-
@Ashish 我也试过了,但没有帮助