编辑明细怎么传和获取参数?

发布时间:2015/11/10 11:03:17  

1、页面上跳转的js函数

    function mingxi() {
           alert(0);
           var node = $('#tab_list' ).datagrid('getSelected');
           if (node) {
               window.location.href = 'chanpin.aspx?IId=' node.id;
           }
           else
               alert("请选择一条记录");
       }

2、后台读取id的过程

            else if (Convert.ToString(context.Request.Form["action"]) == "query")
            {
                string strif = "";
                string urlstr = context.Request.UrlReferrer.Query;
                if (urlstr != null && urlstr != "")
                {
                    string strid = urlstr.Substring(urlstr.IndexOf("=") 1);
                    //读取  strif = "主表id=" strid;

                }

                string strret = bll.GetListByPageColumns_tojson("id,产品名称,产品数量,产品规格,备注", strif, "产品数量");
                context.Response.Write(strret);
                return;
            }


 
 

Copyright ? 2015 All Rights Reserved.

备案: 浙ICP备16014922