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?