How do build a composite or template control in ASP.Net MVC, or the equivelant?


How do build a composite or template control in ASP.Net MVC, or the equivelant?



In our current ASP.Net Webforms application we have several composite/template server controls that only exist for a common look and feel. For example, we have a panel control that has a title, a place for buttons related to the contents of the panel, and of course the contents. How is this best accomplished in MVC? RenderPartial doesn't get done what I need here. Should I still be using the same controls, but just on a view page? These controls don't really do anything on postback, they are only there for a common look and feel.

More Info:

We have a control in Webforms that implements ICompositeControl. We have a few properties on this control like Panel (type Panel), Buttons (again type Panel which would hold buttons) and a property Title of type string. Visually it looks like

alt text


To achieve basic code coverage what tests should I run against an ASP.NET MVC Controller?

1:

Using ASP.Net MVC Data Annotation outside of MVCHow to disable Export to Microsoft Excel in the IE browser right click?Detect if an element is selected in listbox or not through jquery

2:

asp.net mvc jquery how to enable the button after disable
I'm a little hazy around the exact requirements here although i'f I understand this correctly then you want a control this has say title information with variable content such as static text, controls, images etc etc.. Creating Database Mocks in ASP.NET MVC using Data from Existing Database If I had to have a control this acted as a container for content, no matter what this content was, I think I'd consider a Html Helper this I could pass information to and it could make the assessment on what content to render.. Is it possible to configure ELMAH entirely in code? It could then either call ananother helper, render a partial view or whatever..


89 out of 100 based on 74 user ratings 749 reviews

*