Give different names to the new windows and it will open different all the time.
Right now, you must be using same name in all the cases for the new window. This forces to open in the existing one only.
For ex: 'myWindowName' is the name that needs to be different all the time.
var reportWindow = window.open('CostByProject.aspx', 'myWindowName','height=650,width=900,resizable=1,status=yes,scrollbars=1,toolbar=no,menubar=no,location=no');
UPDATE:
piramanayagam.shiva wrote:
Page.ClientScript.RegisterStartupScript(this.GetType(),"op", "window.open ('" + Request.ApplicationPath + "/Operators/Chat.aspx', null,'width=450,height=450,left=350,top=120');", true);
You need to change this 'null' to a unique string.
Thus do something like:
private int iCount = 0;
private string myNewWindow = String.Empty;
protected void DataGrid1_ItemCommand(object source, DataGridCommandEventArgs e)
{
myNewWindow = "myNewWindow" + iCount.ToString();
if (e.CommandName == "elink")
{
Page.ClientScript.RegisterStartupScript(this.GetType(),"op", "window.open ('" + Request.ApplicationPath + "/Operators/Chat.aspx','"+ myNewWindow+"','width=450,height=450,left=350,top=120');", true);
}
iCount++;
}
This could had been done other ways too. This is one of them.