Response.Redirect("../../Notices/sendxml.ashx?Title=agri/" + title);//tile是文章的名称
                            Response.Redirect("proMgr.aspx");
我想往../../Notices/sendxml.ashx发送“?”后面的数据而不跳转,因为我想跳转到proMgr.aspx
有没有什么函数可以方便的解决这个问题啊?就想在这个后台解决而不是从别的地方再跳回来。谢谢

解决方案 »

  1.   

        var url = "a.ashx?Id=" + ID.value;
                xmlHttp.open("GET", url, true);
                xmlHttp.onreadystatechange = function() {
                    if (xmlHttp.readyState == 4) {
                        if (xmlHttp.status == 200) {}}}
    访问ashx
      

  2.   

    HttpWebRequest webRequest = (HttpWebRequest)HttpWebRequest.Create(url);
    HttpWebResponse webResponse = webRequest.GetResponse();
    StreamReader streamReader = new StreamReader(webResponse, Encoding.UTF8);
    string resultHtml = streamReader.ReadToEnd();//得到响应信息大概象这个样子,中间会设置一些相关参数。可以参考这篇帖子 #4楼 回复 模拟post提交注册或者搜索HttpWebRequest相关使用方法
      

  3.   

    想多了吧,从后台?不用ajax,你实现了告诉我一声
      

  4.   


    web服务端可以这样用的。
      

  5.   

    如果你说在前台页面直接提交请求的话,就用ajax,jquery很多提交ajax请求的函数。
    直接用JS提交也没几句代码。常用ajax请求的几个函数:
    $.ajax([options])
    load(url, [data], [callback])
    $.get(url, [data], [fn], [type])
    $.getJSON(url, [data], [fn])
    $.getScript(url, [callback])
    $.post(url, [data], [fn], [type])JS的话,使用XMLHttpRequest就可以了