protected void Page_Load(object sender, EventArgs e) { string id = Request.QueryString["id"]; if (!string.IsNullOrEmpty(id)) { if (!IsPostBack) { db = Global.CrusadersEntitiesDB(); player = db.Players.Where(x => x.id == int.Parse(id)).First(); } } else { Response.Redirect("Players.aspx"); } GamesRepeater.DataSource = player.Games.ToList(); GamesRepeater.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { db = Global.CrusadersEntitiesDB(); string id = Request.QueryString["id"]; if (!string.IsNullOrEmpty(id)) { if (!IsPostBack) { pl = db.Players.Where(x => x.id == int.Parse(id)).Single(); games = pl.Games.ToList(); GamesRepeater.DataSource = db.Games1.ToList(); TxtFName.Text = pl.FamilyName; TxtName.Text = pl.Name; TxtNmb.Text = pl.Number; TxtPst.Text = pl.Position; } } else { Response.Redirect("Show.aspx"); } }