Jean Paul Olvera
Jean Paul Olvera

Reputation: 399

My aspx mark up file has too much code, there is a way I can split it?

Im using a asp.net Web Forms Multiview control with 14 Views inside it.

Finishing the first View I realize that is too much code in just one view (over 10k lines of code), I must repeat the same code in the 13 remaining, the process of open the aspx file in VS2017 and navigate through it is slow , can I use a reference to another aspx file inside the views?

I know I can use masterpage and viewstates but I would like that solution as the last one.

Upvotes: 2

Views: 53

Answers (1)

Mohsin Mehmood
Mohsin Mehmood

Reputation: 4236

You can create user controls (.ascx) files for each view content and then refer user controls inside your aspx page containing the Multiview control.

  1. https://msdn.microsoft.com/en-us/library/wt3k2fyw.aspx
  2. https://msdn.microsoft.com/en-us/library/sbz9etab.aspx

Upvotes: 2

Related Questions