joseaardvark
New Member
I'm writing an application involving storing a profile. I'm using Linq to access the database, but having a weird issue when saving a profile. When I save it, it writes to the DB correctly - but when I leave the page and come back, the old values still remain in profile form.My profile page:\[code\]if(!Page.IsPostBack) { Profile p = Student.GetProfile(Int32.Parse(Session["userID"].ToString())); if (p != null) { FirstNameTextBox.Text = p.FirstName; LastNameTextBox.Text = p.LastName; Address1TextBox.Text = p.Address1; ..... }\[/code\]And my Student class:\[code\] public static Profile GetProfile(int uID) { var profile = (from p in db.Profiles where p.uID == uID select p).FirstOrDefault(); return profile; }\[/code\]I'm not doing any fancy caching anywhere, so not sure where the old values are stored...