比如:
<body>
document.getElementById("txtDnValue").value = pluginobj.getSIPDN();//就是这个值怎么样写入session中???
</body>

解决方案 »

  1.   

    建一个ashx来存Session,用ajax调用这个ashx。
      

  2.   

    Jquery 代码 需要引用Jquery文件function test() {
        var id = document.getElementById("txtDnValue").value;
        $.ajax({
            type: "POST",
            async: false,
            url: "Test.aspx/test",
            data: "{ID:" + id + "}",
            dataType: "json",
            contentType: "application/json; charset=utf-8",
            success: function(msg) {
            }
        });
    }
    C# 代码、 [WebMethod()]
    public static void test(string id)
    {
    //这里前台的id已经传过来
    }
      

  3.   


     [WebMethod()]
    public static void test(string ID)  //这个ID应该是大写
    {
    //这里前台的id已经传过来
    }
      

  4.   

    能给一个完整的demo,能直接执行的