protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
Bind();
}
}
protected void Bind() {
string strSql = "select * from test";
DataSet ds = Utility.getDataList(strSql);
GridView1.DataSource = ds.Tables[0];
GridView1.DataBind();
}
protected void btnOk_Click(object sender, EventArgs e)
{
//string strSql = "select * from test";
//DataSet ds = Utility.getDataList(strSql);
//Label1.Text =ds.Tables[0].Rows[0]["id"].ToString();
string strSql = "Update test Set name = '" + TextBox1.Text + "' Where id='11'";
Utility.ExecuteSql(strSql);
Bind();
}
protected void TextBox1_TextChanged(object sender, EventArgs e)
{
Label1.Text = TextBox1.Text;
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("<script language='javascript'> window.location='addPage.aspx'</script>");
}
{
if (!this.IsPostBack)
{
Bind();
}
}
protected void Bind() {
string strSql = "select * from test";
DataSet ds = Utility.getDataList(strSql);
GridView1.DataSource = ds.Tables[0];
GridView1.DataBind();
}
protected void btnOk_Click(object sender, EventArgs e)
{
//string strSql = "select * from test";
//DataSet ds = Utility.getDataList(strSql);
//Label1.Text =ds.Tables[0].Rows[0]["id"].ToString();
string strSql = "Update test Set name = '" + TextBox1.Text + "' Where id='11'";
Utility.ExecuteSql(strSql);
Bind();
}
protected void TextBox1_TextChanged(object sender, EventArgs e)
{
Label1.Text = TextBox1.Text;
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("<script language='javascript'> window.location='addPage.aspx'</script>");
}