Am I able to create a custom View to be used as a template? RRS feed

  • Question

  • User1351072825 posted

    First off, I apologize if this question is obvious or has been asked before. Half the trouble of finding the answer to your problem is knowing the proper terminology to yield an answer. So far, every google result has brought me to something else.

    The gist of this is, I have a multiview with 4 different views. It could be 2 or 10. The point is that it's more than 1 and these views are exactly the same. 

    A lot of the examples of multiviews has a few controls that are the same for each view, but with different IDs. 

    But if my controls take up several hundred lines of code, that really stacks up; especially in the codebehind with the saving and loading from the DB. 

    I've read that I can use PartialViews, but that seems to use just html, and I need asp:control(s) 

    When it comes to loading, I want to query for the data on these four different profiles, reusing the same query four different times,  filling each view one by one, targeting the control by ID on the current view. 

    Then doing the same thing on the save. It seems unnecessary to write duplicate load/save functions for each view when they're all doing the exact same thing, essentially. 

    Saturday, December 22, 2018 2:28 AM

All replies