protected void Button1_Click(object sender, EventArgs e) { Addlayer ad1 = new Addlayer(); int idno = Convert.ToInt32(TextBox1.Text); var singlestudent = ad1.Getstudent(idno); GridView1.DataSource = singlestudent; GridView1.DataBind(); }
protected void Button1_Click(object sender, EventArgs e) { Addlayer ai = new Addlayer(); int Id = int.Parse(TextBox1.Text); string Sname = TextBox2.Text; string Scourse = TextBox3.Text; string Doj = TextBox4.Text; ai.DInsert(Id, Sname, Scourse, Doj); }
protected void Button1_Click(object sender, EventArgs e) { Addlayer ad1 = new Addlayer(); DateTime Doj = DateTime.Parse(TextBox1.Text); string Sname = TextBox2.Text; var up = ad1.update(Doj, Sname); GridView1.DataSource = up; GridView1.Dispose(); }
protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { Addlayer a = new Addlayer(); var strlist = a.getallrecords(); GridView1.DataSource = strlist; GridView1.DataBind(); var str = a.Insert(); GridView1.DataSource = str; } }