protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { try { if (e.CommandName == "Select") { MultiView1.ActiveViewIndex = 1; GridView1.Visible = true; int index = Convert.ToInt32(e.CommandArgument.ToString()); string id = GridView2.DataKeys[index].Value.ToString(); var emp = db.tb_Employees.Where(x => x.Employee_id == id).FirstOrDefault(); if (emp != null) { text_editname.Text = emp.Name; text_editaddress.Text = emp.Address; text_editemail.Text = emp.Email; text_editphone.Text = emp.Phone; DropDownList2.SelectedValue = emp.Division_id; } } } catch (Exception) { } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)