datagrid修改问题
default.aspx.cs
using System;
using System.Data;
using System.Data.OleDb;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
void Page_Load(object sender, EventArgs e)
{
// OleDbConnection acon = new OleDbConnection( "Provider=Microsoft.Jet.OleDb.4.0;Data Source=G:\\vs2005\\easynews1\\App_Data\\db.mdb ");
// DataSet ds = new DataSet();
// acon.Open();
// OleDbDataAdapter access = new OleDbDataAdapter( "Select top 6 * from news ", acon);
// access.Fill(ds, "copynews ");
// dg.DataSource = ds.Tables[ "copynews "].DefaultView;
// dg.DataBind();
// acon.Close();
// acon = null;
if (!Page.IsPostBack) bindgrid();