protected void imgBtnShowDeductBalance_OnCommand(object sender, CommandEventArgs e) { this.mPopUpShowDeductPrepaidPkg.Show(); selectedPrepaidBottle = PrepaidBottleManager.GetPrepaidBottleByID(Convert.ToInt32(e.CommandArgument.ToString())); PrepaidBottleList pList = new PrepaidBottleList(); pList.Add(selectedPrepaidBottle); //populate formview fview_DeductPrepaidBottle.DataSource = pList; fview_DeductPrepaidBottle.DataBind(); //display current balance (fview_DeductPrepaidBottle.FindControl("lblCurrentBalanceValue") as Label).Text = selectedPrepaidBottle.Balance.ToString(); //set the focus on the deduct qty textbox (fview_DeductPrepaidBottle.FindControl("txtDeductQty") as TextBox).Focus(); }