开发者

Binding for user controls embedded in page

I have an ASP.NET page where I call this.DataBind() to bind the controls. I also have various user controls embedded. One has a drop down list, the bind statement gets called for it 2x but the sender the first time is not th开发者_运维技巧e drop down list.

Am I using the databind incorrectly? I use databind to get the properties of my page bound to a datasource so that I can use those properties in the declarative code.

In my DropDownList, I added if (sender == dropDownList) which solved the problem


Make sure that none of your user controls are themselves calling .DataBind()

.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜