在asp.net中填充模态窗口 [英] Populating a Modal window in asp.net

查看:80
本文介绍了在asp.net中填充模态窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Datagrid,每列都有一个链接按钮.单击链接按钮时,将显示模态"弹出窗口.我想让模态"窗口在打开时从父"页面显示详细信息".任何人都可以建议如何做到这一点.在此先感谢

Hi I have a Datagrid with a link button for each column. When clicked the link button displays a Modal popup window. I want to get the Modal window to display Details from the Parent page when opened. Can anyone suggest how to do this. Thanks in advance

推荐答案

This[^] might help you.


受保护的void GridView1_RowCommand(对象发送者,GridViewCommandEventArgs e)
{

url ="ReportSwitch.aspx?Level =" + rdoEducationLevel1.SelectedItem.Text.ToString()+& ListItem =" + ASPxListBox1.SelectedItem.Text.ToString().Trim()+";
ScriptManager.RegisterStartupScript(this,this.GetType(),"PopUpWindow","PopUpWindow(""+ url +"'');,true);

}

在JavaScript中使用此代码:



函数PopUpWindow(url){

window.open(URL,"Report",``高度= 500,宽度= 1050,左侧= 30,顶部= 50,可调整大小=否,滚动条=是,工具栏=否,状态=否,位置=否'')
}
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{

url = "ReportSwitch.aspx?Level=" + rdoEducationLevel1.SelectedItem.Text.ToString() + "&ListItem=" + ASPxListBox1.SelectedItem.Text.ToString().Trim() + "";
ScriptManager.RegisterStartupScript(this, this.GetType(), "PopUpWindow", "PopUpWindow(''" + url + "'');", true);

}

in JavaScript Use this Code:



function PopUpWindow(url) {

window.open(url, "Report", ''height=500,width=1050,left=30,top=50,resizable=no,scrollbars=yes,toolbar=no,status=no,location=no'')
}


这篇关于在asp.net中填充模态窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆