tags:

views:

13

answers:

2

Hi guys,

Is it a good practice to place helper methods within the MasterPage?

Should I be worried that when I introduce new classes in AppCode folder it can result more objects to be created in the memory and build and application start times will be increased as well?

thanks!

+3  A: 

If your helper function is specific to the type of page that your MasterPage templates, then go ahead and put in in there. Otherwise, add it to the App_Code.

Don't worry about the memory required to put a function or a couple classes in the App_Code. It's not significant.

EndangeredMassa
A: 

I think it's better to put them into some special class (e.g. static one) if they are not related to the MasterPage otherwise some base class can be the solution. You can have more than one MasterPage...

Jan Suvak