Hello everyone. A simple problem.... Got a SqlDataSource with a select, in this select I want to insert a value from web.config just like this
<asp:SqlDataSource ... SelectCommand="SELECT field FROM table"></asp:SqlDataSource>
well field is a value from web.config "Field" application setting
<add key="Field" value="tablename"/>
I want to reference it like this:
<asp:SqlDataSource ... SelectCommand="SELECT <%$ AppSettings:Field %> FROM table"></asp:SqlDataSource>
NO WORK!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Well, if there is something very bothering in the ASP.NET Framework, it is inline expressions. I DONT UNDERSTAND WHICH USE AND WHY SOMETIMES SOME EXPRESSIONS WORK AND THE SAME ONES DO NOT IN VERY SIMILAR CONTEXTES for example, in the ConnectionString property if I write
ConnectionString = "<%$ ConnectionStrings:MyConn %>"
IT WORKS IN THAT SAME DAMN TAG!!!!!! (I mean the SqlDataSource) Thank you