I am not sure there is a way to combine variables with static text in the
*.aspx file for the Text property. I would suggest setting the Text property
in your code (probably immediately after you set the property). There might
be a way to do what you want using the (DataBindings) property (or whatever
the correct term for that box that you see above the (ID) property is, I'm
not sure if it is technically a property), but I have never used databinding
with anything other than databases and different collection types for
properties in controls that contain lists (such as DataList, DropDownList,
CheckBoxList, etc.), so I don't really know. Good Luck!
--
Nathan Sokalski
nj********@hotmail.com http://www.nathansokalski.com/
<pa*********@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
Hi all,
I'm trying to display the a Page variable's value in the Text property
of a CheckBox control in the aspx file:
<asp:CheckBox ID="agreeTerms" Text="I agree to the <%# this.SiteName %>
terms and conditions" runat="server" />
I can do this elsewhere on the page, outside of a control, but in the
Text property it just renders the literal text: <%# this.SiteName %>
amongst the other text.
How can I achieve this in an aspx file, or do I have to set this
property in the code behind file?
Thanks,
Paul