开发者

Validation in nested UpdatePanel(s)

开发者 https://www.devze.com 2023-02-20 08:55 出处:网络
I have an ASP.Net page which has several UpdatePanels. Each UpdatePanel loads an UserControl, and per UserControl, sub UserControl(s) may exists. In order to achieve partial-refresh, each sub UserCont

I have an ASP.Net page which has several UpdatePanels. Each UpdatePanel loads an UserControl, and per UserControl, sub UserControl(s) may exists. In order to achieve partial-refresh, each sub UserControl will be carried through UpdatePanel. Those UserControls have input controls, and corresponding validator server controls.

The problem is, validators in a sub-UserControl will also trigger the validation in its parent UserControl; however, I'd like separate validation into scopes based on UpdatePanel. Please kindly help.

I'm using Visual Studio 2008 and .Net 3.5.

Thank you. William

-- EDITED --- E.g.

Validation in nested UpdatePanel(s)

I've an UserControl called "AddableDropDown" which is a drop down list that provides the ability of adding new list item on the fly. It consists of a drop down list for illustrating the currently available items; a asp:textbox for entering the title for the new item, a asp:button for submitting the new item, and a "RequiredFieldValidator" target on the asp:textbox.

The "AddableDropDown" will be used 开发者_C百科in different UserControl-based "web form" which has other kinds of inputs and Validators.

The goal I'm trying to reach is separating the Validation of the AddableDropDown from each of its instances, as well as each parent control of it.


Have you tried out it by having a validationgroup for the controls in each and every panel

0

精彩评论

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

关注公众号