<li id="Li16" runat="server" style="display:none"><a id="ApprvModel" onclick="OpenWindow()">Approval Pendancy</a></li>
function OpenWindow() { window.open("frmEnterprise.aspx", "mywindow", "status=1, width=700, height=500, top=100, left=300"); }
frmEnterprise.aspx
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server" style="width:450PX;height:150PX"> <div style="width:450PX; height:auto;text-align:center"> <asp:Label ID="Label1" runat="server" Text="Enterprise"></asp:Label> <asp:DropDownList ID="enterpriseList" runat="server" Width="280px" Height="22px"> </asp:DropDownList> <asp:Button ID="btnGO" runat="server" Text="GO" onclick="btnGO_Click" /> </div> </form>
protected void btnGO_Click(object sender, EventArgs e) { int ind = enterpriseList.SelectedIndex; if (ind < 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Message", "alert('Select Enterprise')", true); } else { Session["DBName"] = enterpriseList.SelectedValue; Response.Redirect("frmApprovalHome.aspx"); //Response.Redirect("frmApprovalHome.aspx?DBName=" + enterpriseList.SelectedValue + ""); } }
I solved above issue using ClientScript.RegisterStartupScript(GetType(), "closePage", "<script type=\"text/JavaScript\">window.opener.location.href='RedirectAnotherPage.aspx'; window.close();");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)