I am trying to set a TextBox control's Text property to the value of a variable declaratively. The only way I have found that will set the text property is if I place it in the code-behind page, which is what I'm trying to avoid.
I have tried to do all of the following, but with no success:
<asp:TextBox ID="myTxt" runat="server" Text='<%# MyNamespace.MyClass.StaticString %>' />
<asp:TextBox ID="myTxt" runat="server" Text='<%= MyNamespace.MyClass.StaticString %>' />
<asp:TextBox ID="myTxt" runat="server" Text='<% Response.Write(MyNamespace.MyClass.StaticString); %>' />
<asp:TextBox ID="myTxt" runat="server" /><% myTxt.Text = MyNamespace.MyClass.StaticString; %>
Is this even possible and if so how?