1

I have hundred lines of code asp.net in my view, It make me difficult to find what I need it. So do anyone have some idea to divide it into separate files? As I know, in php , have function include().

1
  • Resharper? Refactor into classes? Commented Dec 9, 2011 at 1:59

1 Answer 1

1

Take a look at ASP.NET MVC partial views. These let you break down your view into separate reusable components, similar to user controls in ASP.NET WebForms.

Sign up to request clarification or add additional context in comments.

1 Comment

In addition what @Chris suggested, you can also use view templates to provide the base layout and then use partial views to fill in the gaps for each page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.