-------------this function in source side-----------
<script language="javascript" type="text/javascript">
function openPopup(strOpen)
{
open(strOpen, "frmEmpHP-OT_Detail", "status=1, width=300, height=200, top=100, left=300");
}
</script>
---------this function in server side-----------
buttonname.Attributes.Add("OnClick", "javascript:window.open('frmEmpHPOTDetail.aspx?EmpId=" + gdvEmployeeList.Rows[i].Cells[0].Text + "&date=" + date + "','frmEmpHPOTDetail','width=850, height=500, menubar=no, scrollbars=yes, resizable=yes,')");
---------upper this function should written in the page from which u want to open the window
now below these 2 lines should written on the pop window so that after close it display the previous page-- submit button/close button_ click
Response.Write("<script>window.opener.location=window.opener.location;</script>");
Response.Write("<script language=javascript>window.close();</script>");
Prabhu4042, if this helps please login to Mark As Answer. | Alert Moderator