0
       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)
        {
        }
        > 
1
Contributor
1
Reply
11
Views
1 Year
Discussion Span
Last Post by nagarjuna9
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.