Should my custom widgets be located in App_Data too?

Posted by Community Admin on 03-Aug-2018 20:53

Should my custom widgets be located in App_Data too?

All Replies

Posted by Community Admin on 07-Mar-2012 00:00

I admit I have been building themes and widgets the hard way with my own folder structure ~ not using the recommended App_Data files structure. Giving it a shot now, and a couple questions come to mind. Any quick answers out there?

1. Visual Studio 2010 doesn't like to create a new .master page inside App_Data. I assume I create it elsewhere and then move it. Do I need to update the "Inherits" path in the Master tag? To what?

2. Should my custom widget code also reside within the App_Data folder?

Thanks much!

Posted by Community Admin on 07-Mar-2012 00:00

You can indeed move a master page, the inherits doesn't have to change, as it's not a reference to the path, but rather the namespace of the master page. You can leave it as is, or change the namespace to something custom. as long as they match on the cs ans .master you should be fine.

Custom widget code doesn't need to go in the app_data folder, I believe only the widget templates if you're using them. If you're developing a widget as an ascx file you can place it in a separate folder like ~/Widgets, that's what I do.

hope this is helpful!

This thread is closed