Move partial page property to View without code behind

glixannoria

New Member
I am refactoring a web app built with previous versions of Asp.Net MVC where all the views have 2 codebehind files each.Also if the views are working correctly I want to begin to remove all the code behind files as most of them are empty.There are few of them that have properties like this in the codebehind:\[code\]public partial class List { public Message NewMessage { get { return new Message(); } }}\[/code\]Before completely removing them (I know this methods do not pertain to the views) how do I replicate them in the single page aspx or ascx?
I just tried to copy and paste the public methods in <% %> tags but this is not working.
 
Back
Top