protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ServiceRef.LiveScoreServiceClient client = new ServiceRef.LiveScoreServiceClient("BasicHttpBinding_ILiveScoreService");
                string team1 = client.getTeamName((int)Session["team1id"]);
                string team2 = client.getTeamName((int)Session["team2id"]);
                lbteam1.Text      = team1;
                lbteam2.Text      = team2;
                lbmatchtitle.Text = client.getMatchTitle((int)Session["matchid"]);

                int matchid = (int)Session["matchid"];
                int inn     = client.getInning(matchid);
                //For 2nd Innings
                if (inn == 2)
                {
                    Response.Redirect("matchEnd.aspx");
                }

                //Swap batteam and bowlteam
                int temp = (int)Session["batteamid"];
                Session["batteamid"]  = (int)Session["bowlteamid"];
                Session["bowlteamid"] = temp;

                //Declaring striker non striker
                List <Player> ob = client.getOpeners((int)Session["batteamid"]).ToList();
                Session["striker"]    = ob[0].Id;
                Session["nonstriker"] = ob[1].Id;

                //Select Bowler
                if (ddlfbowl.Items.Count == 0)
                {
                    int           bowlteamid = (int)Session["bowlteamid"];
                    List <Player> b          = client.getBowlers(bowlteamid).ToList <Player>();
                    foreach (Player p in b)
                    {
                        ddlfbowl.Items.Add(new ListItem(p.Name, p.Id.ToString()));
                    }
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                client = new ServiceRef.LiveScoreServiceClient("BasicHttpBinding_ILiveScoreService");
                int mid = (int)Session["matchid"];
                int inn = client.getInning(mid);
                if (inn == 1)
                {
                    string tosscomm = client.getTossCom(mid);
                    lbtoss.Text   = tosscomm;
                    lbinning.Text = inn.ToString() + "st Innings";
                }
                else
                {
                    string inncomm = client.getInnComment(mid);
                    lbtoss.Text   = inncomm;
                    lbinning.Text = inn.ToString() + "nd Innings";
                    Team bowlteam = client.getTeamDetails((int)Session["bowlteamid"]);
                    int  target   = bowlteam.Score + 1;
                    lbtarget.Text = "Target: " + target.ToString();
                }
                string team1 = client.getTeamName((int)Session["team1id"]);
                string team2 = client.getTeamName((int)Session["team2id"]);
                lbteam1.Text      = team1;
                lbteam2.Text      = team2;
                lbmatchtitle.Text = client.getMatchTitle((int)Session["matchid"]);
                int bid = (int)Session["batteamid"];

                //Batting Team stats
                Team t = client.getTeamDetails(bid);
                lbbatteam.Text  = t.Name;
                lbtscore.Text   = t.Score.ToString();
                lbtwickets.Text = t.Wickets.ToString();
                lbtover.Text    = t.Overs.ToString();
                lbtrr.Text      = t.Runrate.ToString();

                Player str    = client.getPlayerDetails((int)Session["striker"]);
                Player nonstr = client.getPlayerDetails((int)Session["nonstriker"]);
                Player bowl   = client.getPlayerDetails((int)Session["bowler"]);

                //Striker stats
                lbbat1name.Text  = str.Name;
                lbbat1runs.Text  = str.Batruns.ToString();
                lbbat1balls.Text = str.Balls.ToString();
                lbbat1fours.Text = str.Fours.ToString();
                lbbat1sixes.Text = str.Sixes.ToString();
                lbbat1strk.Text  = str.Strikerate.ToString();

                //Non Striker Stats
                lbbat2name.Text  = nonstr.Name;
                lbbat2runs.Text  = nonstr.Batruns.ToString();
                lbbat2balls.Text = nonstr.Balls.ToString();
                lbbat2fours.Text = nonstr.Fours.ToString();
                lbbat2sixes.Text = nonstr.Sixes.ToString();
                lbbat2strk.Text  = nonstr.Strikerate.ToString();

                //Bowler stats
                lbbowl.Text     = bowl.Name;
                lbbowlover.Text = bowl.Overs.ToString();
                lbbowlrun.Text  = bowl.Bowlruns.ToString();
                lbbowlwick.Text = bowl.Wickets.ToString();
                lbbowleco.Text  = bowl.Economy.ToString();

                c = client.getCommentary(mid).ToList();
            }
        }