如何在数据库中插入随机生成的文本框vlues [英] How to insert the randomly generated textbox vlues in database

查看:68
本文介绍了如何在数据库中插入随机生成的文本框vlues的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在数据库中插入随机生成的文本框vlues

How to insert the randomly generated textbox vlues in database

推荐答案

foreach(Control ctrl in this.Controls)
{
    if(ctrl is TextBox)
    {
        //database insertion operation
    }
}



但是是的,确保你已经为这些TextBox分配了ID。

我没有在IDE上测试过这段代码,但它仍然看起来很有希望。 :)

-KR


But yeah, make sure that you've ID assigned with those TextBoxes.
I've not tested this code on IDE, but still it looks to be promising. :)
-KR


这篇关于如何在数据库中插入随机生成的文本框vlues的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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