Mahesh Babu

Mahesh Babu

  • NA
  • 118
  • 32k

How to Code the CRUD Operations for GRID dynamicaly Asp.net

Sep 4 2018 12:57 AM
Below U can Find the Code 
 
How to Code the CRUD Operations for GRID dynamically in Asp.net
 
please help me this 
 
Thanks
 
using log4net;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace DynamicAspProj
{
public partial class Change : System.Web.UI.Page
{
SqlConnection _con = new SqlConnection(@"Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=Revalsys;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False");
SqlCommand _cmd;
SqlDataAdapter _da;
DataSet _ds;
DataTable _dt;
protected void Page_Load(object sender, EventArgs e)
{
_con.Open();
_cmd = new SqlCommand("select* from tblEmployee", _con);
SqlDataReader rdr = _cmd.ExecuteReader();
GridView1.DataSource = rdr;
GridView1.DataBind();
_con.Close();
}
}
}

Answers (1)