Posted on: 11/14/2011 10:15:50 PM | Views : 228

Hello everybody, 
I got a small problem and i've read a lots of topics about it but nothing seems working. 
I want to get a GridView based on the current user logged. 
To do that, i use a SqlDataSource with a parameter in the SELECT query then in the Page_Load method, i add the current user in the query but nothing appear in the GridView. 
I tested the query via SQL Server Management Studio with the concerned user and it works. 
Here is my code in the .aspx : 
<asp:SqlDataSource ID="BesoinsNonResolus" runat="server" ConnectionString="<%$ ConnectionStrings:InformationUtilisateurs %>" DeleteCommand="DELETE FROM [Besoins] WHERE [BesoinId] = @BesoinId" InsertCommand="INSERT INTO [Besoins] ([BesoinTitre], [BesoinType], [DatePublication], [BesoinId]) VALUES (@BesoinTitre, @BesoinType, @DatePublication, @BesoinId)" SelectComman ...

Go to the complete details ...