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

.net的showModaldialog 不能刷新页面吗,为什么我在showModaldialog执行查找后返回的值为undefined

主页
        function GetBrandId() {
            var arr = window.showModalDialog('/view/ShowDialog/GetBrand.aspx', '', "dialogWidth:450px; dialogHeight:450px; help: no; scroll: yes; status: no");
            alert(arr);
            if (arr == undefined) {
                arr = window.returnValue;
                alert(arr+"++");
            }
            if (arr != undefined) {
                
                var id = arr.substring(0, arr.indexOf("|"));
                var text = arr.substring(arr.indexOf("|") + 1);
                $("#HiddenField3").val(id);
                $("#ContentPlaceHolder1_Label4").text(text);
            }
        }


showModaldialog 页面

    <script type="text/javascript">
        function retVal(id, text) {
            alert(text);
            var obj = window.dialogArguments;
            window.returnValue = id + "|" + text;
            window.close();
        }
    </script>
在showModaldialog 页面就是简单执行在数据库模糊查询或者是AspNetPager翻页控件,只要刷新了页面在调用retVal(id, text)这个方法,在retVal()方法里都能获取到text,但是返回主页面就值没了,就成undefined了,谁帮我看看; .NET showModaldialog --------------------编程问答-------------------- 自己顶一下,高手帮帮忙!
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,