I'm trying to pull data from sql database and assigning it to text boxes. But I get error when there is no data in column (null).
string athleteId = Request.Cookies["LoggedInUser"].ToString();
var athlete = AthleteDAL.GetAthleteByID(athleteId);
if (athlete.AthleteFName != null)
{
TextBoxFirstName.Text = athlete.AthleteFName.ToString();}
I'm getting null point exception on if statement.