protected void Button1_Click(object sender, EventArgs e)
{
c.cmd.CommandText = "select * from newuser";
c.adp.Fill(c.ds, "vT");
c.dr = c.ds.Tables["vT"].NewRow();
c.dr["id"] =c.auto_id("emp",c.ds.Tables["vT"].Rows.Count);//i am getting error here
c.dr["username"] = txtusername.Text;
c.dr["first_name"] = txtfname.Text;
c.dr["password"] = passtxt.Text;
c.dr["image"] = "~//new_user_image/" + ImgUpload.FileName;
c.dr["phone"] = txtphone.Text;
c.dr["email"] = emailtxt.Text;
c.dr["status"] = "false";
c.dr["login_status"] = "false";
c.ds.Tables["vT"].Rows.Add(c.dr);
c.cb = new SqlCommandBuilder(c.adp);
c.adp.Update(c.ds.Tables["vT"]);
ImgUpload.SaveAs(Server.MapPath("~//new_user_image/" + ImgUpload.FileName));
Response.Redirect("success_signup.aspx");
}
i am getting error please tell me how to resolve it
himanshu