1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
   |  
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:variante6ConnectionString %>" 
            SelectCommand="SELECT * FROM [Question] WHERE ([CodeTheme] = @CodeTheme)" 
            DeleteCommand="DELETE FROM [Question] WHERE [CodeQuestion] = @CodeQuestion" 
            InsertCommand="INSERT INTO [Question] ([CodeQuestion], [TextQuestion], [CodeTheme]) VALUES (@CodeQuestion, @TextQuestion, @CodeTheme)" 
            UpdateCommand="UPDATE [Question] SET [TextQuestion] = @TextQuestion, [CodeTheme] = @CodeTheme WHERE [CodeQuestion] = @CodeQuestion">
            <SelectParameters>
                <asp:ControlParameter ControlID="DropDownList1" Name="CodeTheme" PropertyName="SelectedValue" Type="Int32" />
            </SelectParameters>
            <DeleteParameters>
                <asp:Parameter Name="CodeQuestion" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="TextQuestion" Type="String" />
                <asp:Parameter Name="CodeTheme" Type="Int32" />
                <asp:Parameter Name="CodeQuestion" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="CodeQuestion" Type="Int32" />
                <asp:Parameter Name="TextQuestion" Type="String" />
                <asp:Parameter Name="CodeTheme" Type="Int32" />
            </InsertParameters>
        </asp:SqlDataSource> | 
Partager