how to save that  text boxes data into database ,by using this button evet,please tell me iam fresher.


< protected void Page_Load(object sender, EventArgs e)
        {

            if (!Page.IsPostBack)
                Session.Remove("clicks");
        }


        protected void Button2_Click1(object sender, EventArgs e)
        {
            int rowcount = 0;
            rowcount = Convert.ToInt32(Session["clicks"]);
            rowcount++;
            Session["clicks"] = rowcount;
            for (int i = 0; i < rowcount; i++)
            {
                TextBox TextBox1 = new TextBox();
                TextBox TextBox2 = new TextBox();
                TextBox TextBox3 = new TextBox();

                Label Label1 = new Label();
                Label Label2 = new Label();
                Label Label3 = new Label();
                TextBox1.ID = "TextBox1" + i.ToString();
                TextBox2.ID = "TextBox2" + i.ToString();
                TextBox3.ID = "TextBox3" + i.ToString();

                Label1.ID = "Label1" + i.ToString();
                Label2.ID = "Label2" + i.ToString();
                Label3.ID = "Label3" + i.ToString();
                Label1.Text = "name" + (i + 1).ToString() + " :";
                Label2.Text="phoneno  :";
                Label3.Text = "emailid:";

                Panel1.Controls.Add(Label1);
                Panel1.Controls.Add(TextBox1);

                Panel1.Controls.Add(Label2);
                Panel1.Controls.Add(TextBox2);

                Panel1.Controls.Add(Label3);
                Panel1.Controls.Add(TextBox3);
                Panel1.Controls.Add(Button2);
                Panel1.Controls.Add(Button1);



            }

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
        }
        > 

are you understand my quation?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.