user974047
user974047

Reputation: 2285

Link C# SqlCommand to the SelectCommand of SqlDataSource on aspx page

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

Answers (1)

IUnknown
IUnknown

Reputation: 22448

SqlDataSource accepts Session parameters: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.sessionparameter.aspx. Use it instead.

Upvotes: 2

Related Questions