动态文本框值存储在数据库中

问题描述:

我正在尝试创建一个表单,用户在其中输入数字以生成文本框.例如,当用户在文本框中输入3时,将在新框架中生成三个文本框.现在,当用户将数据写入这些文本框中时,我希望将其保存在MYSQL数据库中.有人请帮我解决这个问题.

I''m trying to create a form where the user gives number to generate textboxes. when for example the user enters 3 into textbox, three text boxes get generated in the new frame. now when the user write data into these text boxes I want it to be saved in MYSQL database. Anybody please help me into this.

尝试
将最大计数保存在视图状态中,使用count
循环执行page.findcontrol
然后您可以将值插入数据库
try Dynamically adding textboxes

create the Text box Ids like "txt_" + count

save the maximum count in a viewstate, do page.findcontrol in a loop with the count

then you can insert the values to the database