自定义控件 [英] Custom Controls
问题描述
使用自定义控件时。为了检查并查看值是否已更改
,必须实现IPostBackDataCollection接口。为控件返回的
值似乎只是一个逗号为
分隔值的字符串。
例如,如果我是渲染两个文本框。一个有价值特里
和另一个有价值''烧伤''我会得到以下价值
特里,伯恩斯。
我需要这个更像这样
Forname,Terry,Surname,Burns。所以我把它变成一个钥匙/配对系列。
这里有什么东西我不见了,因为我不知道怎么能这样做。我试着渲染和ID名称,以确定这是否会产生这种效果,但
导致事件无法触发。
任何想法都会受到欢迎。
-
OHM(特里伯恩斯)
。 。 。单手人。 。
When using a custom control. In order to check and see if values have
changed one has to implement the IPostBackDataCollection interface. The
values returned for the control seem to be simply a string with comma
delimited values.
For example, if I were to render two text boxes. One with the Value Terry
and the Other with the Value ''Burns'' I would get the following value
Terry,Burns.
I need this to be more like this
Forname,Terry,Surname,Burns. So I get get this into a key/Pair collection.
Is there something Im missing here, as I''m not sure how I can do this. I
tried rendering and ID name to see if this would generate this effect, but
it caused the event not to fire.
Any Ideas would be welcome.
--
OHM ( Terry Burns )
. . . One-Handed-Man . . .
推荐答案
我通过使用隐藏输入标签解决了这个问题,但必须有一个更简单的
slicker这样做的方式是什么?
-
OHM(特里伯恩斯)
。 。 。单手人。 。
One Handed Man(OHM - Terry Burns)" < news.microsoft.com>在消息中写道
新闻:OA ************** @ TK2MSFTNGP10.phx.gbl ...
I resolved this by using Hidden Input tags, but there must be an easier
slicker way to do this?
--
OHM ( Terry Burns )
. . . One-Handed-Man . . .
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:OA**************@TK2MSFTNGP10.phx.gbl...
使用自定义控件时。为了检查并查看值是否已更改,必须实现IPostBackDataCollection接口。为控件返回的
值似乎只是一个逗号分隔值的字符串。
例如,如果我要渲染两个文本框。一个有价值特里
和另一个有价值''烧伤''我会得到以下价值
特里,伯恩斯。
我需要这个更像是这样
Forname,Terry,Surname,Burns。所以我把它变成了一个钥匙/双
系列。
这里有什么东西我不见了,因为我不知道怎么能这样做。我尝试了渲染和ID名称,看看是否会产生这种效果,但是它会导致事件无法触发。
任何想法都会受到欢迎。
-
OHM(特里伯恩斯)
。 。 。单手人。 。
When using a custom control. In order to check and see if values have
changed one has to implement the IPostBackDataCollection interface. The
values returned for the control seem to be simply a string with comma
delimited values.
For example, if I were to render two text boxes. One with the Value Terry
and the Other with the Value ''Burns'' I would get the following value
Terry,Burns.
I need this to be more like this
Forname,Terry,Surname,Burns. So I get get this into a key/Pair collection.
Is there something Im missing here, as I''m not sure how I can do this. I
tried rendering and ID name to see if this would generate this effect, but
it caused the event not to fire.
Any Ideas would be welcome.
--
OHM ( Terry Burns )
. . . One-Handed-Man . . .
只有开发自定义控件的人才能回答这个问题。
我们不是有源代码。
-
HTH,
Kevin Spencer
..Net开发商
微软MVP
大件东西组成
很多小东西。
一手人(OHM - 特里伯恩斯) < news.microsoft.com>在消息中写道
新闻:OA ************** @ TK2MSFTNGP10.phx.gbl ...
Only the person who developed the custom Control can answer this question.
We don''t have the source code.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:OA**************@TK2MSFTNGP10.phx.gbl...
使用自定义控件时。为了检查并查看值是否已更改,必须实现IPostBackDataCollection接口。为控件返回的
值似乎只是一个逗号分隔值的字符串。
例如,如果我要渲染两个文本框。一个有价值特里
和另一个有价值''烧伤''我会得到以下价值
特里,伯恩斯。
我需要这个更像是这样
Forname,Terry,Surname,Burns。所以我把它变成了一个钥匙/双
系列。
这里有什么东西我不见了,因为我不知道怎么能这样做。我尝试了渲染和ID名称,看看是否会产生这种效果,但是它会导致事件无法触发。
任何想法都会受到欢迎。
-
OHM(特里伯恩斯)
。 。 。单手人。 。
When using a custom control. In order to check and see if values have
changed one has to implement the IPostBackDataCollection interface. The
values returned for the control seem to be simply a string with comma
delimited values.
For example, if I were to render two text boxes. One with the Value Terry
and the Other with the Value ''Burns'' I would get the following value
Terry,Burns.
I need this to be more like this
Forname,Terry,Surname,Burns. So I get get this into a key/Pair collection.
Is there something Im missing here, as I''m not sure how I can do this. I
tried rendering and ID name to see if this would generate this effect, but
it caused the event not to fire.
Any Ideas would be welcome.
--
OHM ( Terry Burns )
. . . One-Handed-Man . . .
那就是我。
我的问题是一个概念,而不是关于
问题中的特定控制。
-
OHM(Terry Burns)
。 。 。单手人。 。
" Kevin Spencer" < KS ****** @ takempis.com>在留言中写道
news:e7 ************** @ TK2MSFTNGP10.phx.gbl ...
Well that would be me.
My question is one of concept, not regarding the particular control in
question.
--
OHM ( Terry Burns )
. . . One-Handed-Man . . .
"Kevin Spencer" <ks******@takempis.com> wrote in message
news:e7**************@TK2MSFTNGP10.phx.gbl...
只有开发人员自定义控件可以回答这个问题。
我们没有源代码。
-
HTH,
Kevin Spencer
.Net开发者
微软MVP
很多东西都是由很多小东西组成的。
一个汉族人(OHM - Terry Burns) < news.microsoft.com>写在
消息新闻:OA ************** @ TK2MSFTNGP10.phx.gbl ...
Only the person who developed the custom Control can answer this question.
We don''t have the source code.
--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message news:OA**************@TK2MSFTNGP10.phx.gbl...
使用自定义控件时。为了检查并查看值是否已更改,必须实现IPostBackDataCollection接口。为控件返回的
值似乎只是一个逗号分隔值的字符串。
例如,如果我要渲染两个文本框。一个价值
特里和另一个价值''烧伤''我会得到以下价值
特里,伯恩斯。
我需要这个更像是这样
Forname,Terry,Surname,Burns。所以我把它变成了一个密钥/对
When using a custom control. In order to check and see if values have
changed one has to implement the IPostBackDataCollection interface. The
values returned for the control seem to be simply a string with comma
delimited values.
For example, if I were to render two text boxes. One with the Value Terry and the Other with the Value ''Burns'' I would get the following value
Terry,Burns.
I need this to be more like this
Forname,Terry,Surname,Burns. So I get get this into a key/Pair
集合。
我在这里找不到什么东西,因为我不知道怎么办这个。我尝试了渲染和ID名称,看看是否会产生这种效果,
但它导致事件无法触发。
任何想法都会受到欢迎。
-
OHM(特里伯恩斯)
。 。 。单手人。 。
Is there something Im missing here, as I''m not sure how I can do this. I
tried rendering and ID name to see if this would generate this effect, but it caused the event not to fire.
Any Ideas would be welcome.
--
OHM ( Terry Burns )
. . . One-Handed-Man . . .
这篇关于自定义控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!