views:

30

answers:

1

Is there a complete list of the objects you can tap into with <%$ %> tags in ASP.NET

I know you can do things like <%$ ConnectionStrings:northwind %> in the ConnectionString attribute of the <asp:SqlDataSource> tag.

Can you also do this with Cookies and Session? Is there a <%$ %> reference page out there?

+2  A: 

What you're looking for are called ASP.NET Expressions. AppSettings, ConnectionStrings, and Resources are the default providers made available with ASP.NET, but one can write a custom ASP.NET Expressions provider for just about anything.

The ones you're looking for (Cookies and Session) have been written and made available here.

Adam Maras
Very cool stuff. Thanks. +1
tyndall
CodeExpressionBuilder is my favorite. You can see how it was built at http://weblogs.asp.net/infinitiesloop/archive/2006/08/09/The-CodeExpressionBuilder.aspx
Chris Shouts
I ended up setting the connection in the code behind based off a Session variable. Within that .zip file there seemed to be a missing base class. It was the base class that all the "Editors" inherit from.
tyndall