ASP.NET的VB6控件数组等价 [英] ASP.NET equilivant of VB6 control array

查看:73
本文介绍了ASP.NET的VB6控件数组等价的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用C#在ASP.NET中有一个项目。我有大量的Button控件和大量的ImageButton控件。如果我可以通过它的索引号来引用特定控件,就像我在VB6中使用命令数组一样,那将是一种便利。分配然后获取为控件识别的特定唯一的方法是什么?示例代码或参考文章将不胜感激。

谢谢,

吉姆

I have a project in ASP.NET using C#. I have a large number of Button Controls and a large number of ImageButton Controls. It would be convienent if I could refer to a specific control by it''s index number, in the same way in which I used a Command Array in VB6. What is the method of assigning and then obtaining a specific unique identified for a control ? Sample code or reference articles would be appreciated.
Thanks,
Jim

推荐答案

使用发件人你的事件处理程序的参数,以确定哪个控件

解雇了这个事件。

" James McGivney" <交流***** @ acura66.com>在消息中写道

新闻:C0 ********************************** @ microsof t.com ...
Use the "sender" argument of your event handler to identify which control
fired the event.
"James McGivney" <ac*****@acura66.com> wrote in message
news:C0**********************************@microsof t.com...
我在ASP.NET中使用C#进行了一个项目。我有大量的Button
控件和大量的ImageButton控件。如果我能通过它的索引号来引用一个特定的控件,那将是一个很好的方式

,就像我在VB6中使用命令数组的
一样。分配和/ b $ b b的方法是什么,然后获得为控件识别的特定唯一?示例代码或

参考文章将不胜感激。谢谢,
Jim
I have a project in ASP.NET using C#. I have a large number of Button Controls and a large number of ImageButton Controls. It would be convienent
if I could refer to a specific control by it''s index number, in the same way
in which I used a Command Array in VB6. What is the method of assigning and
then obtaining a specific unique identified for a control ? Sample code or
reference articles would be appreciated. Thanks,
Jim



将sender参数转换为控件类型,然后访问其属性。


有一个控件数组集合相当于VB6模型,但是AFAIK

它仅适用于Windows窗体。


-

____________________

Klaus H. Probst,MVP
http ://www.vbbox.com/


" James McGivney" <交流***** @ acura66.com>在消息中写道

新闻:C0 ********************************** @ microsof t.com ...
Cast the sender argument to the control type and then access its properties.

There is a control array collection equivalent to the VB6 model, but AFAIK
it only works on windows forms.

--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

"James McGivney" <ac*****@acura66.com> wrote in message
news:C0**********************************@microsof t.com...
我在ASP.NET中使用C#进行了一个项目。我有大量的Button
控件和大量的ImageButton控件。如果我能通过它的索引号来引用一个特定的控件,那将是一个很好的方式

,就像我在VB6中使用命令数组的
一样。分配和/ b $ b b的方法是什么,然后获得为控件识别的特定唯一?示例代码或

参考文章将不胜感激。谢谢,
Jim
I have a project in ASP.NET using C#. I have a large number of Button Controls and a large number of ImageButton Controls. It would be convienent
if I could refer to a specific control by it''s index number, in the same way
in which I used a Command Array in VB6. What is the method of assigning and
then obtaining a specific unique identified for a control ? Sample code or
reference articles would be appreciated. Thanks,
Jim



你能详细说明windows中可用的控件数组吗

表单项目?

" Klaus H. Probst" <我们******* @ vbbox.com>在消息中写道

news:eq ************** @ TK2MSFTNGP10.phx.gbl ...
Can you elaborate on this control array collection available in a windows
forms project?
"Klaus H. Probst" <us*******@vbbox.com> wrote in message
news:eq**************@TK2MSFTNGP10.phx.gbl...
将发送者参数转换为控件类型,然后访问它的
属性。
有一个控件数组集合相当于VB6模型,但AFAIK
它只适用于Windows窗体。

-
____________________
Klaus H. Probst,MVP
http: //www.vbbox.com/

" James McGivney" <交流***** @ acura66.com>在消息中写道
新闻:C0 ********************************** @ microsof t.com。 ..
Cast the sender argument to the control type and then access its properties.
There is a control array collection equivalent to the VB6 model, but AFAIK
it only works on windows forms.

--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

"James McGivney" <ac*****@acura66.com> wrote in message
news:C0**********************************@microsof t.com...
我在ASP.NET中使用C#进行了一个项目。我有大量的Button控件和大量的ImageButton控件。如果我可以通过它的索引号来引用一个特定的控件,那就是
I have a project in ASP.NET using C#. I have a large number of Button Controls and a large number of ImageButton Controls. It would be



convienent,我在VB6中使用了一个命令数组的
方式。分配
然后获取为控件识别的特定唯一的方法是什么?示例代码
或参考文章将不胜感激。


convienent if I could refer to a specific control by it''s index number, in the same way in which I used a Command Array in VB6. What is the method of assigning and then obtaining a specific unique identified for a control ? Sample code or reference articles would be appreciated.

谢谢,
Jim
Thanks,
Jim




这篇关于ASP.NET的VB6控件数组等价的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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