如何从放置在表格中的文本框中检索值 [英] how to retreive values from text boxes placed in a table

查看:85
本文介绍了如何从放置在表格中的文本框中检索值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用c#代码中的for循环创建了一个包含多于一行的表,它由文本框组成,但是我无法检索输入到变量中的值或无法将其存储到数据库中.plz help

I have created a table with more than 1 row using for loop in c# code.It consist of text boxes, but I am not able to retrieve values typed in it to a variable or can''t store it to the database.Plz help

推荐答案

1.遍历表格的行
2.在行级别使用FindControl查找文本框.一旦获得文本框,您就可以访问它的值和其他属性.

试试吧!
1. Loop through the rows of table
2. Use FindControl at row level to find the textbox. Once you get the textbox you can access it''s value and other properties.

Try!


这篇关于如何从放置在表格中的文本框中检索值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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