<script type='text/javascript'>    
    
    function ShowModelDG(ctl)
{
var obj = window.showModalDialog("../../MaterialPubliForm/MaterialPubliForm/SelectUserListTable.aspx",null,"dialogWidth:550px;dialogHeight:480px;help:no;status:no");
ctl.value=obj;
}
    </script>

解决方案 »

  1.   

    显示对话window.showModalDialog('URL','参数');读出参数
    var  strValue = window.dialogArguments;
    alert(strValue)
      

  2.   

    ../../MaterialPubliForm/MaterialPubliForm/SelectUserListTable.aspx?id=1
      

  3.   

    ShowModelDG(ctl,"参数") 
    这样行吗?
      

  4.   

    a.html 代码如下:
    <script>
    aa='liuyk';
    window.showModalDialog('b.html',aa); 
    </script>
    b.html代码如下;
    <script>
    var  strValue = window.dialogArguments; 
    document.write(strValue)
    </script>
    运行a.html看是不是你候要的结果
      

  5.   

    看你也怎么传。把当前页传过去,用this试一下<script type='text/javascript'>     
        
        function ShowModelDG(ctl) 

    var obj = window.showModalDialog("../../MaterialPubliForm/MaterialPubliForm/SelectUserListTable.aspx",this,"dialogWidth:550px;dialogHeight:480px;help:no;status:no"); 
    ctl.value=obj; 

        </script> 
    URL传参数
        function ShowModelDG(ctl) 

    var obj = window.showModalDialog("../../MaterialPubliForm/MaterialPubliForm/SelectUserListTable.aspx?p=xray2005",this,"dialogWidth:550px;dialogHeight:480px;help:no;status:no"); 
    ctl.value=obj; 

        </script> 
      

  6.   


    <asp:GridView ... onrowdatabound="GridView1_RowDataBound">
       <Columns>
         ...
         <asp:TemplateField>
            <ItemTemplate>
                <asp:HyperLink ID="HyperLink1" runat="server" 
                                NavigateUrl="javascript:void(0);"
                                Text='<%# Eval("CategoryName") %>'
                                >
                </asp:HyperLink>
            </ItemTemplate>
         </asp:TemplateField>
        </Columns>
    </asp:GridView> protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                HyperLink link = e.Row.FindControl("Hyperlink1") as HyperLink;
                link.Attributes["onclick"] = string.Format("showModalDialog('Details.aspx?id={0}','','dialogWidth:500px;dialogHeight:500px;help:no;status:no')", GridView1.DataKeys[e.Row.RowIndex].Value);
            }
    }