protected void Page_Load(object sender, EventArgs e) { try { gvCustomers2.DataSource = DBDemoxOy.GetDataReal().DefaultView; gvCustomers2.DataBind(); } catch (Exception ex) { } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataTable mDataTable = DBDemoxOy.GetDataReal(); GridView1.DataSource = mDataTable; GridView1.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { try { DataTable dt = DBDemoxOy.GetDataReal(); gvAsiakkaat.DataSource = dt; gvAsiakkaat.DataBind(); } catch (Exception ex) { lblMessages.Text = ex.Message; } }
protected void Page_Load(object sender, EventArgs e) { try { dt = DBDemoxOy.GetDataReal(); gvCustomers2.DataSource = dt; gvCustomers2.DataBind(); } catch (Exception ex) { throw ex; } }
protected void Page_Load(object sender, EventArgs e) { try { DataView dv = new DataView(); DataTable dt = DBDemoxOy.GetDataReal(); dv = dt.DefaultView; sqlCustomers.DataSource = dv; sqlCustomers.DataBind(); } catch (Exception ex) { lblSystemMessage.Text = ex.ToString(); } }
protected void Button1_Click(object sender, EventArgs e) { DataTable koo = new DataTable(); DataTable joo = new DataTable(); koo = DBDemoxOy.GetDataSimple(); GridView1.DataSource = koo; GridView1.DataBind(); lblUserName.Text = koo.Rows.ToString();//your cloumn name; //lblUserName.Text = dt.Rows[0]["UserName"].ToString();//your cloumn ; joo = DBDemoxOy.GetDataReal(); GridView1.DataSource = joo; GridView1.DataBind(); lblUserName.Text = joo.Rows.ToString();//your cloumn name; }