Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 877953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:41:37+00:00 2026-05-15T11:41:37+00:00

I need to implement a wizardy, dynamic UI that uses complex validation of the

  • 0

I need to implement a wizardy, dynamic UI that uses complex validation of the style:

  • If A = 1, show controls B, C, D. B is
    required, C is not, and D is not
    required must be less than 30 if it
    is populated.

  • If A = 2, show controls B, D, E. B is
    not required, D is required but has
    no limits, and E is not required.

  • If B is not null, show controls B, D, E. B is
    not required, D is required but has
    no limits, and E is not required.

Historically, I have made my presentation layer as “dumb” as possible in that it is only responsible for capturing user input and binding it to the appropriate domain model. The domain model, in turn, contains the logic needed to validate it’s state and that of any child objects, and then communicates any invalid state to the presentation layer via notifications. As such, this requirement for a highly “intelligent” UI represents a departure for me.

I think I have no choice but to construct 2 very similar class hierarchies:

  1. one that will capture presentation business rules (i.e. what fields are visible) and control what renders in the View
  2. one that will capture domain business rules (when field A = X, then field B should be not null and in the range of n to m) to disallow objects with an invalid state from being persisted

Sill I have far more questions than answers on my strategy moving forward. Is there a set of design patterns I can draw on to build such a dynamic UI? I do have the option of using ASP.NET MVC or WebForms, so whichever approach will produce cleaner, testable code is preferred.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T11:41:38+00:00Added an answer on May 15, 2026 at 11:41 am

    I’d certainly be using MVC and I’d also keep the logic in the business layer.

    You could wire it up using jQuery ajax postbacks which would then check in with the business layer and get told what to display.

    Once the choice has been made, you can then return a partial view and replace the contents of a div with the returned html.

    I know this sounds like an ugly solution but i think with this level of interactivity with the code behind you have little choice. If you do a submit each time then that looks ugly.

    the other benefit is that you don’t just need to return a partialview. you could return a json object which describes the new rules for your controls such as length etc.

    you then use jquery to monitor the input and enforce the new rules.

    also try to think RESTfully if at all possible.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to implement portable code, but I do not know how to deal
i need to implement a messaging scenario that consumes messages from throusands of destinations
I need to implement some crypto protocol on C# and want to say that
I need to implement a tree of decisions, very simple, not complicated in objective
I need to implement a server that can send Push Notifications to Android mobile
I need to implement an efficient excel-like app. I'm looking for a data structure
I need to implement the following: There is a table A which is supposed
i need to implement the email signature with image.As of now we only support
I need to implement AI for game based on fuzzy logic. I need to
I need to implement some new functions on an editor. I picked Emacs -

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.