Question asp:SqlDataSource parameter problem?

raysefo

Well-known member
Joined
Jul 21, 2010
Messages
207
Programming Experience
Beginner
Hi,

I have a sqldatasource like below. What i would like to do is to pass a session value as a parameter to select command. or at least how can i pass a parameter to it?


thanks

VB.NET:
Expand Collapse Copy
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:EFormsConnectionString1 %>"
            ProviderName="<%$ ConnectionStrings:EFormsConnectionString1.ProviderName %>"
            [B]SelectCommand[/B]="SELECT Users.name AS 'Talebi Yapan', CONVERT (varchar(20), Tasks.CreationDate, 113) AS 'Talep Zamanı', EformType.EformName as 'EForm Adı', Tasks.EformID, Tasks.EformType, Tasks.TaskID, Tasks.CreatedBy FROM Tasks INNER JOIN EformType ON Tasks.EformType = EformType.EformType INNER JOIN Users ON Tasks.CreatedBy = Users.SAMAccountName WHERE (Tasks.IsApproved = 0) and Tasks.Approver =[B]@user[/B] ORDER BY Tasks.CreationDate asc">
        </asp:SqlDataSource>
 
Back
Top