由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
DotNet版 - control array in .net
相关主题
datagrid helphow to let button response 'return' key?
a question about C++.net class libraryAnswer Re: ASP.NET 难题测试 (1)
一道mcad考试题求解(有关DataAdapter)C# problems
User control question:数据绑定问题
Reference type问题自动化的问题 (WebBrowser)
问题又来了.A VB Question from a beginner
一个dropdownlist的问题A Bug about TextBox?
listbox 的问题Chaago.com
相关话题的讨论汇总
话题: them话题: control话题: array话题: net话题: textbox
进入DotNet版参与讨论
1 (共1页)
c*o
发帖数: 70
1
.net doesn't support control array feature.
If I have ten TextBox controls laying out in a web form,I have to name them
differently rather than named them with a same name then differeniate them by
index. it is not convinient if I want to use a loop to get all the text value
of them in code. Any one has any idea or hint?
c*****o
发帖数: 34
2
create and manipulate them programmatically, i.e., in your code

【在 c*o 的大作中提到】
: .net doesn't support control array feature.
: If I have ten TextBox controls laying out in a web form,I have to name them
: differently rather than named them with a same name then differeniate them by
: index. it is not convinient if I want to use a loop to get all the text value
: of them in code. Any one has any idea or hint?

c*o
发帖数: 70
3
I know how to do it programatically. But it is hard to put array of controls
in an existing table layout. I am thinking using the previous VB way, drag
and drop control arrays on to a form,and differentiate them by index. The
should be some reason why .net abandons this great feature.

them
by
value

【在 c*****o 的大作中提到】
: create and manipulate them programmatically, i.e., in your code
C****n
发帖数: 2324
4
Control Array feature sucks. It's a foundmental design flaw and should be
discarded.
In .Net, you have better way to do it:
foreach (Control c in tablecell.Controls)
if (c is TextBox)
{
.............
}
If you want to manipulate them in javascript, I am not very familiar with
javascript, but there has to be a way to do it, javascript is soooooo
flexible.

them

【在 c*o 的大作中提到】
: I know how to do it programatically. But it is hard to put array of controls
: in an existing table layout. I am thinking using the previous VB way, drag
: and drop control arrays on to a form,and differentiate them by index. The
: should be some reason why .net abandons this great feature.
:
: them
: by
: value

1 (共1页)
进入DotNet版参与讨论
相关主题
Chaago.comReference type问题
求教:从条形码扫描器Scanner读数据到VB .NET程序问题又来了.
C#的更高境界一个dropdownlist的问题
LinqPad is handylistbox 的问题
datagrid helphow to let button response 'return' key?
a question about C++.net class libraryAnswer Re: ASP.NET 难题测试 (1)
一道mcad考试题求解(有关DataAdapter)C# problems
User control question:数据绑定问题
相关话题的讨论汇总
话题: them话题: control话题: array话题: net话题: textbox