protected void Button1_Click(object sender, EventArgs e) { TrainerDataLayer al = new TrainerDataLayer(); string ee = al.insertRec(txtName.Text.ToString(), txtEmail.Text.ToString(), txtMobile.Text.ToString(), Convert.ToDateTime(trainerDob.Text.ToString()), txtDomain.Text.ToString()); Label1.Visible = true; Label1.Text = ee; }
protected void Button1_Click(object sender, EventArgs e) { TrainerDataLayer al = new TrainerDataLayer(); var list = al.search(Convert.ToInt32(searchId.Text)); searchGrid.DataSource = list; searchGrid.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { TrainerDataLayer al = new TrainerDataLayer(); var list = al.getAllRecords(); trainerDataGrid.DataSource = list; trainerDataGrid.DataBind(); } }