开发者

dynamic web form, is there pattern or sample application

开发者 https://www.devze.com 2023-02-17 06:25 出处:网络
I have dynamic form about posting room ad and first option is: Room in: In flat or In dorm according the choice, other fields set up.

I have dynamic form about posting room ad and first option is:

Room in: In flat or In dorm

according the choice, other fields set up. I don't want to do this hard-code, for the sake of maintenance plus, there is validation issue while creating and editing.

can you suggest any sample work for this kind of dynamic form, incl开发者_如何学Cuding maybe html helper, object oriented, validator.

attached image is raw version!


A simple way would be to put each form inside an user control (.ascx) and then load the control dynamically. If you use a model-view-presenter approach, each user control can have it's own presenter and deal with the details. I imagine that it must be another way to split a view in parts, but using an user control seems to be the most simple way of doing it.

0

精彩评论

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