Hi there,
The Contact Form encapsulates these controls so you can't access them directly. There are a few ways around this:
1. Set the values in the Control's Load method.
2. Create properties, like the NavigateUrl in the Banner. As the backing variable they should use the associated controls. E.g. something like this:
Code:
public string FirstName
{
get
{
return FirstName.Text;
}
set
{
FirstName.Text = value;
}
}
Then in the page that uses the contact form, you can do:
ContactForm1.FirstName = "Some default value"; // Use Profile.FirstName perhaps?
In both case, make sure you don't do this on a PostBack (check for Page.IsPostBack) or you'll wipe out the values the user entered.
Hope this helps,
Imar