Click here to Skip to main content
15,847,653 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I am doing web based project.I have created dynamic table of text boxes. Now i want to add value of all text boxes in sql server 2008.So can you suggest me?
Posted
Updated 13-Aug-13 1:45am
v2
Comments
[no name] 13-Aug-13 7:03am    
Suggest you what?

1 solution

Try this:

//get from db and put text-box dynamically as below:

C#
Database object loop{
           TextBox new_textbox = new TextBox();
           new_textbox.ID = "txt" + 1;
           new_textbox.Text = "";
           PlaceHolder1.Controls.Add(new_textbox);
          }


When you click submit button then need to get value of all text box, so for that again do same as above:

C#
Database object loop{
           TextBox tb = (TextBox)PlaceHolder1.FindControl(dbobject.[name]);
           string str1 = tb.text;

       }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900