KavyaVS
asked on
How to make two popup windows remain open
It's a .Net 3.5 web application. Opening the 2nd popup window closing the first one.
I want both of them in open state. The sequence is as follows:
In the Page1.aspx GridView row command 1st popup window (page2.aspx) will be opened.
In the page2.aspx button click event 2nd pop up window (page3.aspx) will be opened.
After page3.aspx opened as pop up from page2.aspx(that is popup from page1),page2.aspx is automatically getting closed. I still want it to be in open state.
How to make it happen(two popups in open state at the same time).
Page1.aspx code
protected void gv_RowCommand(object sender, GridViewCommandEventArgs e)
{
try
{
GridView grd = (GridView)sender;
switch (grd.ID.ToString())
{
case "grdStudent":
{
int iRowIndex = Convert.ToInt32(e.CommandA rgument);
string StudentNo = (grdStudent.DataKeys[iRowI ndex]["stu dent_no"]) .ToString( );
int ID = Convert.ToInt32(grdStudent .DataKeys[ iRowIndex] ["ID"]);
Page.ClientScript.Register StartupScr ipt(this.G etType(), "Pop up", "<script language='javascript'>" + "window.open('/Forms/Page2 .aspx?para m1=" + StudentNo + "¶m2=" + ID + "',null,'height=1000, width=1000,status= no,resizable= yes, scrollbars=yes, toolbar=no,location=no,men ubar=no ');</script>");
break;
}
}
}
catch (Exception ex)
{
}
finally
{
SQLComm.Dispose();
}
}
Page2.aspx code
protected void Button_Click(object sender, EventArgs e)
{
Button btn = (Button)sender;
switch (btn.ID)
{
case "btnDetails":
{
string classNo = (ViewState["class_no"]).To String();
int StudentID = Convert.ToInt32(ViewState[ "StudentID "]) ;
Page.ClientScript.Register StartupScr ipt(this.G etType(), "Pop up", "<script language='javascript'>" + "window.open('/Forms/Page2 .aspx?para m1=" + classNo + "¶m2=" + StudentID + "',null,'height=1000, width=1000,status= no,resizable= yes, scrollbars=yes, toolbar=no,location=no,men ubar=no ');</script>");
break;
}
}
}
Thanks
I want both of them in open state. The sequence is as follows:
In the Page1.aspx GridView row command 1st popup window (page2.aspx) will be opened.
In the page2.aspx button click event 2nd pop up window (page3.aspx) will be opened.
After page3.aspx opened as pop up from page2.aspx(that is popup from page1),page2.aspx is automatically getting closed. I still want it to be in open state.
How to make it happen(two popups in open state at the same time).
Page1.aspx code
protected void gv_RowCommand(object sender, GridViewCommandEventArgs e)
{
try
{
GridView grd = (GridView)sender;
switch (grd.ID.ToString())
{
case "grdStudent":
{
int iRowIndex = Convert.ToInt32(e.CommandA
string StudentNo = (grdStudent.DataKeys[iRowI
int ID = Convert.ToInt32(grdStudent
Page.ClientScript.Register
break;
}
}
}
catch (Exception ex)
{
}
finally
{
SQLComm.Dispose();
}
}
Page2.aspx code
protected void Button_Click(object sender, EventArgs e)
{
Button btn = (Button)sender;
switch (btn.ID)
{
case "btnDetails":
{
string classNo = (ViewState["class_no"]).To
int StudentID = Convert.ToInt32(ViewState[
Page.ClientScript.Register
break;
}
}
}
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER