Bonjour à tous,
j'ai faire une redirection vers un popup via un bouton avec window.showModalDialog et window.open. celà marche parfaitement avec même le passage de paramètres.
une fois le pop up ouvert, le premier traitement lancé via un bouton ou une liste déroulante qui fait une action coté serveur ouvre la même page dans une nouvelle fenêtre.
comment empêcher celà ?

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
protected void Page_Load(object sender, EventArgs e) //page popup
        {
            if (Session.IsNewSession || Session["UserID"] == null)
                Response.Redirect("Default.aspx");
            else
            {
                if (lbltxtNumInter.Text!="") 
                    linter.GetIntervention(lbltxtNumInter.Text);
 
                nbCol = this.GridVListPiece.Columns.Count;
                sUserID = Session["UserID"].ToString();
                if (this.IsPostBack == false)
                {
                    lbltxtNumInter.Text = Request.QueryString["ControlVal"].ToString();
                    if (linter.InterventionExist(lbltxtNumInter.Text))
                    {
                        linter.GetIntervention(lbltxtNumInter.Text);
                        ledetail.DisplayDetailIntervention(GridVListPiece, lbltxtNumInter.Text);
                        setAuthorisedbouton();
                        txtcoutpiece.Text = linter.COUT_DES_PIECES.ToString();
                    }
                    else lblNote.Text = "Problème survenu, prière réessayer svp";
 
                    donref.BindParamList(DropDownListGrpPiece, "GROUPEPIECE");
                    if (DropDownListGrpPiece.SelectedValue.ToString() != "")
                        donref.BindParamList(DropDownListPiece, Convert.ToInt16(DropDownListGrpPiece.SelectedValue));
                }
            }
 
//par exemple cette action sur une liste déroulante
 
        protected void DropDownListGrpPiece_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(DropDownListGrpPiece.SelectedItem.Value))
            {
                ledetail.BindListePieceByGroup(DropDownListPiece, Convert.ToInt16(DropDownListGrpPiece.SelectedItem.Value));
            }
        }
 
<asp:DropDownList ID="DropDownListGrpPiece" runat="server" Height="35px" 
                                    Width="250px" 
                                    onselectedindexchanged="DropDownListGrpPiece_SelectedIndexChanged" 
                                    AutoPostBack="True">
                                </asp:DropDownList>