当前位置:编程学习 > C#/ASP.NET >>

跪求帮助。是关于post的

我现在有A页面有一些div里有一些内容,我现在想要把这些内容提交到B页面,在B页面显示出来该怎么做。
B页面要有A页面的数据并且要保持打开状态
我试用jquery ajax post 数据过去了,但是B页面没有显示,等于白搭,该怎么办呢!跪求!
function CommitToCMS(title, source, author, content, leadin, keyWord) {
            //window.open("Test.aspx?article_title=" + title + "&article_ContentFrom=" + source + "&article_author=" + author +
             "&article_content=" + content + "&article_leadin=" + leadin + "&article_keyword=" + keyWord);
                                    $.ajax({
                                        type: "Post",
                                        url: "Test.aspx",
                                        data: "article_title=" + title + "&article_ContentFrom=" + source + "&article_author=" + author +
                                                 "&article_content=" + content + "&article_leadin=" + leadin + "&article_keyword=" + keyWord,
                                        complete: function (msg) {
                                                                                   }
                                    });
        }

        $(function () {
            $(".CommitToCMS").click(function () {
                var $li = $(this).parents("li");
                var title = $li.children("div:eq(1)").find("a").html();
                var source = $li.children("div:eq(3)").html();
                var author = $li.children("div:eq(4)").html();
                var content = $li.children("span:eq(0)").html();
                var leadin = $li.children("span:eq(1)").html();
                var keyWord = $li.children("span:eq(2)").html();
                CommitToCMS(title, source, author, content, leadin, keyWord);
            });
        });

不能拼 url因为A页面内容太多超出querystring范围了
B页面后台

 protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            Encoding encoding = Encoding.UTF8;
            string title = HttpUtility.UrlDecode(Request.Params["article_title"], encoding);//标题
            string source = HttpUtility.UrlDecode(Request.Params["article_ContentFrom"], encoding);//新闻来源
            if (!string.IsNullOrEmpty(title))
            {
                string _NewsSource = source;
                string _NewsTitle = title;
                string _NewsAuthor = HttpUtility.UrlDecode(Request.Params["article_author"], encoding);//作者
                string _NewsContent = HttpUtility.UrlDecode(Request.Params["article_content"], encoding);//正文
                string _NewsDigest = HttpUtility.UrlDecode(Request.Params["article_leadin"], encoding);//摘要
                string _NewsKeyword = HttpUtility.UrlDecode(Request.Params["article_keyword"], encoding);//关键字
                string[] from = { _NewsSource, _NewsTitle, _NewsAuthor, _NewsContent, _NewsDigest, _NewsKeyword };
                GetNewsContent(from);
            }
        }
    }

    private void GetNewsContent(string[] from)
    {
        Title.InnerText = from[0].ToString();
        Source.InnerText = from[1].ToString();
        Author.InnerText = from[2].ToString();
        Content.InnerText = from[3].ToString();
        Leadin.InnerText = from[4].ToString();
        KeyWord.InnerText = from[5].ToString();
    }
--------------------编程问答-------------------- 沙发吗 --------------------编程问答-------------------- 求助。不要看我代码 如何实现这个功能 --------------------编程问答-------------------- 当A通过ajax来请求B时,它对已打开的B页面不会产生任何影响的!

A与B页面之间有关系么.
譬如是A弹出的子窗口B
或者点击A页面,打开新页面B
或者反过来也可以.

如果A与B之间没有联系.那可以将A页的数据保存在COOKIE
B页面通过javascript定时读取cookie中的值. --------------------编程问答--------------------
引用 3 楼 newdigitime 的回复:
当A通过ajax来请求B时,它对已打开的B页面不会产生任何影响的!

A与B页面之间有关系么.
譬如是A弹出的子窗口B
或者点击A页面,打开新页面B
或者反过来也可以.

如果A与B之间没有联系.那可以将A页的数据保存在COOKIE
B页面通过javascript定时读取cookie中的值.

是一篇文章,可能夸张的长,cookie大小可能不够。
就是a页面有文章,一键然后b页面也出现这篇文章。b页面的逻辑 就是上面的c# code --------------------编程问答-------------------- 求助啊!
--------------------编程问答--------------------
现在是什么问题。。。没得到值。。 --------------------编程问答-------------------- 不是没得到值 就是不知道打开b页面的时候 数据也过去了! --------------------编程问答-------------------- querystring 受到长度限制
post过去么 b页面又不会打开的 --------------------编程问答-------------------- B页面 接受数据的逻辑也不能改 死的! --------------------编程问答--------------------
打不开新页面?

设置form的action --------------------编程问答-------------------- 如果把数据传到B 用B的逻辑介绍 见上c# code。然后B还要打开状态,看到数据在 Title.InnerText 出现
--------------------编程问答-------------------- 在a页面的form上设置action 为b页面
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,