Advertisement
Advertisement
| 07.03.2008 at 01:12PM PDT, ID: 23538064 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: |
protected void Menu1_MenuItemClick(object sender, MenuEventArgs e)
{
DataSet ds = new DataSet();
string cs = System.Configuration.ConfigurationManager.ConnectionStrings["connstring"].ConnectionString;
SqlConnection con = new SqlConnection(cs);
con.Open();
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = "SELECT * FROM CONTACT_ENTITIES";
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(ds);
//for (i = 0; i <= ds.Tables[0].Rows.Count; i++)
//{
// main.InnerText += ds.Tables[0].Rows[i]["name"].ToString();
//}
GridView1.DataSource = ds;
GridView1.DataBind();
}
//public event EventHandler GridViewSortingEventHandler;
//void GridView1_Sorting(Object sender, GridViewSortEventArgs e)
//{
// this.GridView1.Sorting += new GridViewSortingEventHandler(this.GridView1_Sorting);
//}
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
}
|