In my design there are three buttons. I want to open new windows on each button click. I have done upto open a new window. But when I click on the second button it opens in the same popup window. How can I avoid this and open three windows when click on these three buttons?

c# code

protected void btnApprove_Click(object sender, EventArgs e)
{
    string ddlVal = ddlComp.SelectedValue.ToString();
    if (ddlVal != "--Select The Competition--")
    {
        Session["ddlVal"] = ddlComp.SelectedValue.ToString();
        ScriptManager.RegisterStartupScript(this, typeof(string), "APPROVE_WINDOW", "var Mleft = (screen.width/2)-(760/2);var Mtop = (screen.height/2)-(700/2);window.open( 'approved.aspx', null, 'resizable=yes, status=yes,toolbar=no,scrollbars=yes,menubar=no,location=no,top=\'+Mtop+\', left=\'+Mleft+\'' );", true);
    }
    else
    {
        WebMsgBox.Show("Select a competition");
    }
}        

This is the code I have used for all the three buttons with different page names

Related posts

Recent Viewed