2013-03-14 93 views
0

請考慮我有一個帶有添加按鈕和網格的頁面。 網格包含一些數據。 如果我點擊添加按鈕,新的彈出窗口將打開。 彈出窗口包含用於將新值添加到網格的文本框和按鈕。 我的問題是,如何在彈出窗口中添加一些值後自動加載網格視圖?對彈出窗口如何在彈出頁面添加一些數據後加載網格(在主頁面)

代碼:

protected void btnAdd_Click(object sender, EventArgs e) 
{ 
    ClientScript.RegisterStartupScript(this.GetType(), "newWindow", String.Format("<script>window.open('{0}','','width=550,height=300,left=500');</script>", "PopupADD.aspx")); 
} 
+0

剛剛刷新頁面。或者查看它http://stackoverflow.com/questions/5139657/closing-child-pop-up-and-refreshing-parent-page – user2168290 2013-03-14 09:07:16

回答

0

按照以下步驟..

1.Design a window to add data to gridview inside a div. 
2.Show the div as popup using Javascript. 
3.Bind the gridview when you click some button(like ok) in that popup window.