Questions about dnn module MVP model learning

Source: Internet
Author: User
Tags dnn

To allow the view part to be tested, we use interfaces to separate the coupling between the view and the business logic.

My problem is:

Q: Do we need to declare the control declared in Aspx. Design. CS in interface? If declaration is required, is the control declaration in Aspx. Design. CS the implementation of interface?

We cannot directly declare variables with the same name as the Aspx. Design. CS control on the interface. We should think that the controls in Aspx. Design. CS are part of the view and cannot be controlled. What we can do is declare a variable of the same type as the control in the interface, initialize the variable in the presenter, and assign the variable to the control. We can also declare variables that assign values to control attributes in the interface. For example, if we want to provide a list for a DataGrid as the data source, we only need to declare a list in the interface, then in Aspx. in CS.

Q: because the view is based on portalmodulebase. aspx. in CS, many attributes in portalmodulebase are used. Is there any attribute used? What attributes should we declare in the interface?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.