Bonjour,
J'ai un petit problème très embêtant , je ne sais pas comment récupérer le contenu d'une variable en asp.

Dans cette exemple, je voudrais récupérer le contenu de "SelectCommand", comment faut il procéder?

j'ai tester <% response.write(SelectCommand)%> ...
mais sans succès. c'est sans doute très "con"...

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
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Page sans titre</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:maBD %>"
            ProviderName="<%$ ConnectionStrings:maBD.ProviderName %>"
            SelectCommand="SELECT * FROM membres">
        </asp:SqlDataSource>
    </div>
    </form>
</body>
</html>