动态文本框值存储在数据库中 [英] Dynamic textbox values store in to the database

查看:76
本文介绍了动态文本框值存储在数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个表单,用户在其中输入数字以生成文本框.例如,当用户在文本框中输入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


这篇关于动态文本框值存储在数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆