怎样使新增数据显示在表单中

.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
bind();
}
}
private void bind()
{
string strcon="Data Source=(local);Initial Catalog=text;User ID=sa;Password=sa123";
string strsql = "SELECT Card,UserName,Sex,Address FROM UserInfo";
SqlDataAdapter da = new SqlDataAdapter(strsql, strcon);
DataTable dt = new DataTable();
da.Fill(dt);
this.GridView1.DataSource = dt;
this.GridView1.DataBind();
}

    protected void btnAdd_Click(object sender, EventArgs e)
    {
        TextBox txtCard = GridView1.FooterRow.Cells[0].FindControl("txtCard") as TextBox;
        TextBox txtUserName=GridView1.FooterRow.Cells[1].FindControl("txtUserName")as TextBox;
        TextBox txtSex=GridView1.FooterRow.Cells[2].FindControl("txtSex")as TextBox;
        TextBox texAddress=GridView1.FooterRow.Cells[3].FindControl("texAddress")as TextBox;

        Response.Write("txtCard:" + txtCard.Text + "<br/>");
        Response.Write("txtUserName:" + txtUserName.Text + "<br/>");
        Response.Write("txtSex:" + txtSex.Text + "<br/>");
        Response.Write("texAddress:" + texAddress.Text + "<br/>");

        txtCard.Text = "";
        txtUserName.Text = "";
        txtSex.Text = "";
        texAddress.Text = "";
    }

图片说明

不就是一个取值,然后在循环插入么

新增后重新获取一边数据呢