We've all seen the Server Tags cannot contain <% ... %> constructs which comes from trying to use server side <% .. %> inside a server side control:


<asp:TextBox runat="server" Text="<%= ConfigurationManager.AppSettings["Title"] %>" />


You have a few ways around this, the easiest and most common way is to assign the properties server side:


this.textBox1.Text = ConfigurationManager.AppSettings["Title"];


But I like being able to do as much of my property setting in markup as possible so if I ever need to change the property it doesn't require a complete re-build/re-deploy.


The more elegant/fun solution would be to use an ExpressionBudiler, you've most likely used this class already if you've ever worked with a a multilingual website, to have controls pull globalized text from your resx resources you do the following:


<asp:Label runat="server" Text="<%$ Resources:Text, ParticipantHeader %>" />


This is using a ResourceExpressionBuilder, there is also an AppSettingsExpressionBuilder and a ConnectionStringsExpressBuilder built into the .NET framework that you can use. If these don't do what you want you can always build your own, you can see an example of a custom ExpressionBuilder at the MSDN Documentation.