bonjour,dans un gridview j'ai un champ sélectionner je veux quand je clic sur sélectionner me diriger vers une autre page pour mettre a jour les données de salarié qui se trouve dans la ligne sélectionner .mon code dans la page qui contient le gridview est le suivant:


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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<asp:Content ID="Content1" ContentPlaceHolderID="Main" Runat="Server">
    <asp:Label ID="Label1" runat="server" Text="MISE A JOUR DES SALAIRES" 
        style="font-weight: 700; font-size: medium"></asp:Label>
    <br />
    <br />
    <asp:Label ID="Label2" runat="server" Text="Adherent" style="font-size: small"></asp:Label>
    &nbsp; :<asp:TextBox ID="TextBox1" runat="server" Width="40px"></asp:TextBox>
&nbsp;
&nbsp;<asp:TextBox ID="TextBox2" runat="server" Width="52px"></asp:TextBox>
    &nbsp;
 
    <br />
    <br />
    &nbsp;<asp:Label ID="Label4" runat="server" Text="Periode" style="font-size: small"></asp:Label>
    &nbsp;&nbsp;&nbsp; :<asp:TextBox ID="TextBox3" runat="server" Width="110px"></asp:TextBox>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Button ID="Button1" runat="server" Text="valider" />
    <br />
    <br />
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC" 
        BorderStyle="None" BorderWidth="1px" CellPadding="3" 
        DataSourceID="SqlDataSource1" 
        EmptyDataText="Il n'y a aucun enregistrement de données à afficher." 
        Height="331px" onselectedindexchanged="GridView1_SelectedIndexChanged1" 
        Width="479px">
        <RowStyle ForeColor="#000066" />
        <Columns>
            <asp:TemplateField ShowHeader="False">
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                        CommandName="Select" Text="Sélectionner"></asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="pre_par" HeaderText="prenom" 
                SortExpression="pre_par" />
            <asp:BoundField DataField="nom_par" HeaderText="nom" SortExpression="nom_par" />
        </Columns>
        <FooterStyle BackColor="White" ForeColor="#000066" />
        <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
        <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString2 %>" 
        ProviderName="<%$ ConnectionStrings:ConnectionString2.ProviderName %>" 
 
 
 
 
        SelectCommand="SELECT assure.nom_par, assure.pre_par FROM assure INNER JOIN salaire ON assure.cod_sec = salaire.cod_sec AND assure.num_adh = salaire.num_adh AND assure.num_parp = salaire.num_par WHERE (assure.cod_sec = ?) AND (assure.num_adh = ?) AND (salaire.cod_prd = ?)">
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBox1" Name="?" PropertyName="Text" />
            <asp:ControlParameter ControlID="TextBox2" Name="?" PropertyName="Text" />
            <asp:ControlParameter ControlID="TextBox3" Name="?" PropertyName="Text" />
        </SelectParameters>
    </asp:SqlDataSource>
    </asp:Content>