我有个aspx页面,有个按钮,我点击按钮执行操作
btnUpSend.Attributes.Add("onclick", "window.showModalDialog('ArticleUpLoad.aspx?newsID=" + modifyNewsID + "','','dialogWidth=500px;dialogHeight=300px;status:0');");
在子页面执行完操作后,添加了一些新纪录,我想关闭子页面的同时更新父页面的绑定数据,怎么弄啊?
btnUpSend.Attributes.Add("onclick", "window.showModalDialog('ArticleUpLoad.aspx?newsID=" + modifyNewsID + "','','dialogWidth=500px;dialogHeight=300px;status:0');");
在子页面执行完操作后,添加了一些新纪录,我想关闭子页面的同时更新父页面的绑定数据,怎么弄啊?
function btnUpSend_Onclick()
{
var url = 'ArticleUpLoad.aspx?newsID=' + modifyNewsID;
var data = window.showModalDialog(url,'','dialogWidth=500px;dialogHeight=300px;status:0');
}后台btnUpSend.Attributes.Add("onclick","btnUpSend_Onclick()")子页面前台window.returnValue = "";//需要返回的值
window.close();
protected void Page_Load(object sender, EventArgs e)
{
if(! IsPostBack)
{
DataGridBind();
}
}
所以我重新刷页面也是没用的 虽然数据插进去了 但不显示出来,还是原来的数据啊
怎么做撒 晕死了 哪位大哥帮帮我啊 最好能给代码啊
function btnUpSend_Onclick()
{
var url = 'ArticleUpLoad.aspx?newsID=' + modifyNewsID;
var data = window.showModalDialog(url,'','dialogWidth=500px;dialogHeight=300px;status:0');
//data就是需要返回的值,正对需要修改的控件进行赋值就可以了
window.document.forms[0].elements['YouControl_ID'].Value = data;
}
button1_click(object sender,eventargs e)
{
DataGridDataBind();
}然后再子窗口里触发按钮
document.all.button1.click();