I have a page, which has a public property of type myCustomWebProfile.
In code behind I have a textbox, and I am trying to bind the text box, to a property of my web profile described above.
No matter which variations of the binding syntax I use - the textbox is never populated when it's rendered.
Any help will be greatly appreciated.
Here is the C# code-behind class:
public partial class Profile : selfSvcPage
{
public WebProfile pgProfile { get; set; }
protected void Page_Init(object sender, EventArgs e)
{
pgProfile = WebProfile.Current;
}
protected void Page_Load(object sender, EventArgs e)
{
object o = WebProfile.Current.FirstName;
//Successfully populates with a string
object b = DataBinder.Eval(pgProfile, "FirstName");
//Successfully populates with a string
}
}
Here is the code markup:
<telerik:RadTextBox ID="FirstName" Text='<%# Eval("pgProfile.FirstName") %>' SkinID="formText" CssClass="formField" runat="server"/>