Reputation: 2285
Since I want to include a session variable in MySql select
statement, I want to be able to write a sql
string select
statement in .cs
page and reference it in the SelectCommand
property in the SqlDataSource
on the .aspx
page.
How do I achieve that?
Upvotes: 0
Views: 533
Reputation: 22448
SqlDataSource accepts Session parameters: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.sessionparameter.aspx. Use it instead.
Upvotes: 2