Chapter11
Hi,
All, have anyone complited the Chapter 11 TIO(Using profile In WroxUnited)?Because while
running the WroxUnited website of the chapter11 folder I am getting NULL reference exception.
The exception is thrown from the file fanclub.aspx.cs and.The exception is shown for the following line
((TextBox)FCLoginView.FindControl("txtName")).Text = Profile.Name;
The code is as follows:
private void DisplayProfileProperties()
{
TextBox NameBox = (TextBox)FCLoginView.FindControl("txtName");
if (NameBox != null )
{
((TextBox)FCLoginView.FindControl("txtName")).Text = Profile.Name;
((TextBox)FCLoginView.FindControl("txtAddress")).T ext = Profile.Address;
((TextBox)FCLoginView.FindControl("txtCity")).Text = Profile.City;
((TextBox)FCLoginView.FindControl("txtCounty")).Te xt = Profile.County;
((TextBox)FCLoginView.FindControl("txtPostCode")). Text = Profile.PostCode;
((TextBox)FCLoginView.FindControl("txtCountry")).T ext = Profile.Country;
((CheckBox)FCLoginView.FindControl("chkMailing")). Checked = Profile.Mailings;
((TextBox)FCLoginView.FindControl("txtEmail")).Tex t = Profile.Email;
((TextBox)FCLoginView.FindControl("txtAlias")).Tex t = Profile.MemberName;
}
}
So again I am seeking help regarding this problem..
Thanx in advance.
Regards,
Subhasis
|