<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:GSProjectConnectionString %>" SelectCommand="SELECT * FROM [Table] where Owner like '%@username%' ">
<SelectParameters>
<asp:Parameter Name="username" Type="String"/>
</SelectParameters>
</asp:SqlDataSource>
The above is my code wherein i am trying to use a variable username which is defined in .cs file.
It does not take the value of username.
Where am I going wrong ?
Any idea anyone ?