Commits

Anton Afanasyev  committed 505aff1

[DAL2 only]
place module controls into a separate directory "Controls"
introduce a post-install SQL script to correct modules' "FriendlyName"
that DNN messes up on install - this gives modules correct names AND
fixes the DDRMenu bug with equally-named modules

  • Participants
  • Parent commits ba8c62a
  • Branches mydev

Comments (0)

Files changed (23)

File VSIX/CSharp-DAL2-Template/Controls/Edit.ascx

+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Edit.ascx.cs" Inherits="$rootnamespace$$safeprojectname$.Controls.Edit" %>
+<%@ Register TagPrefix="dnn" TagName="label" Src="~/controls/LabelControl.ascx" %>
+<div class="dnnForm dnnEditBasicSettings" id="dnnEditBasicSettings">
+	<div class="dnnFormExpandContent dnnRight ">
+		<a href=""><%=LocalizeString("ExpandAll")%></a>
+	</div>
+
+	<h2 id="dnnSitePanel-BasicSettings" class="dnnFormSectionHead dnnClear">
+		<a href="" class="dnnSectionExpanded">
+			<%=LocalizeString("BasicSettings")%></a>
+	</h2>
+	<fieldset>
+		<div class="dnnFormItem">
+			<dnn:label ID="lblName" runat="server" />
+			<asp:TextBox ID="txtName" runat="server" />
+		</div>
+		<div class="dnnFormItem">
+
+			<dnn:label ID="lblDescription" runat="server" />
+			<asp:TextBox ID="txtDescription" runat="server" TextMode="MultiLine" Rows="5" Columns="20" />
+		</div>
+		<div class="dnnFormItem">
+			<dnn:label ID="lblAssignedUser" runat="server" />
+			<asp:DropDownList ID="ddlAssignedUser" runat="server" />
+		</div>
+	</fieldset>
+</div>
+<asp:LinkButton ID="btnSubmit" runat="server"
+	OnClick="btnSubmit_Click" resourcekey="btnSubmit" CssClass="dnnPrimaryAction" />
+<asp:LinkButton ID="btnCancel" runat="server"
+	OnClick="btnCancel_Click" resourcekey="btnCancel" CssClass="dnnSecondaryAction" />
+
+<script language="javascript" type="text/javascript">
+	/*globals jQuery, window, Sys */
+	(function ($, Sys) {
+		function dnnEditBasicSettings() {
+			$('#dnnEditBasicSettings').dnnPanels();
+			$('#dnnEditBasicSettings .dnnFormExpandContent a').dnnExpandAll({ expandText: '<%=Localization.GetString("ExpandAll", LocalResourceFile)%>', collapseText: '<%=Localization.GetString("CollapseAll", LocalResourceFile)%>', targetArea: '#dnnEditBasicSettings' });
+		}
+
+		$(document).ready(function () {
+			dnnEditBasicSettings();
+			Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function () {
+				dnnEditBasicSettings();
+			});
+		});
+
+	}(jQuery, window.Sys));
+</script>
+

File VSIX/CSharp-DAL2-Template/Controls/Edit.ascx.cs

+/*
+' Copyright (c) $year$ $ownername$
+'  All rights reserved.
+' 
+' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
+' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+' DEALINGS IN THE SOFTWARE.
+' 
+*/
+
+using System;
+using DotNetNuke.Entities.Users;
+using $rootnamespace$$safeprojectname$.Components;
+using DotNetNuke.Services.Exceptions;
+
+namespace $rootnamespace$$safeprojectname$.Controls
+{
+	/// -----------------------------------------------------------------------------
+	/// <summary>
+	/// The Edit class is used to manage content
+	/// 
+	/// Typically your edit control would be used to create new content, or edit existing content within your module.
+	/// The ControlKey for this control is "Edit", and is defined in the manifest (.dnn) file.
+	/// 
+	/// Because the control inherits from $safeprojectname$ModuleBase you have access to any custom properties
+	/// defined there, as well as properties from DNN such as PortalId, ModuleId, TabId, UserId and many more.
+	/// 
+	/// </summary>
+	/// -----------------------------------------------------------------------------
+	public partial class Edit : $safeprojectname$ModuleBase
+	{
+		protected void Page_Load(object sender, EventArgs e)
+		{
+			try
+			{
+				//Implement your edit logic for your module
+				if (!Page.IsPostBack)
+				{
+					//get a list of users to assign the user to the Object
+					ddlAssignedUser.DataSource = UserController.GetUsers(PortalId);
+					ddlAssignedUser.DataTextField = "Username";
+					ddlAssignedUser.DataValueField = "UserId";
+					ddlAssignedUser.DataBind();
+
+					//check if we have an ID passed in via a querystring parameter, if so, load that item to edit.
+					//ItemId is defined in the ItemModuleBase.cs file
+					if (ItemId > 0)
+					{
+						var tc = new ItemController();
+
+						var t = tc.GetItem(ItemId, ModuleId);
+						if (t != null)
+						{
+							txtName.Text = t.ItemName;
+							txtDescription.Text = t.ItemDescription;
+							ddlAssignedUser.Items.FindByValue(t.AssignedUserId.ToString()).Selected = true;
+						}
+					}
+				}
+			}
+			catch (Exception exc) //Module failed to load
+			{
+				Exceptions.ProcessModuleLoadException(this, exc);
+			}
+		}
+	
+
+		protected void btnSubmit_Click(object sender, EventArgs e)
+		{
+			var t = new Item();
+			var tc = new ItemController();
+
+			if (ItemId > 0)
+			{
+				t = tc.GetItem(ItemId, ModuleId);
+				t.ItemName = txtName.Text.Trim();
+				t.ItemDescription = txtDescription.Text.Trim();
+				t.LastModifiedByUserId = UserId;
+				t.LastModifiedOnDate = DateTime.Now;
+				t.AssignedUserId = Convert.ToInt32(ddlAssignedUser.SelectedValue);
+			}
+			else
+			{
+				t = new Item()
+				{
+					AssignedUserId = Convert.ToInt32(ddlAssignedUser.SelectedValue),
+					CreatedByUserId = UserId,
+					CreatedOnDate = DateTime.Now,
+					ItemName = txtName.Text.Trim(),
+					ItemDescription = txtDescription.Text.Trim(),
+					
+				};
+			}
+
+			t.LastModifiedOnDate = DateTime.Now;
+			t.LastModifiedByUserId = UserId;
+			t.ModuleId = ModuleId;
+
+			if (t.ItemId > 0)
+			{
+				tc.UpdateItem(t);
+			}
+			else
+			{
+				tc.CreateItem(t);
+			}
+			Response.Redirect(DotNetNuke.Common.Globals.NavigateURL());
+		}
+
+		protected void btnCancel_Click(object sender, EventArgs e)
+		{
+			Response.Redirect(DotNetNuke.Common.Globals.NavigateURL());
+		}
+	}
+}

File VSIX/CSharp-DAL2-Template/Controls/Edit.ascx.designer.cs

+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace $rootnamespace$$safeprojectname$.Controls
+{
+
+
+        public partial class Edit {
+        
+        /// <summary>
+        /// lblName control.
+        /// </summary>
+        /// <remarks>
+        /// Auto-generated field.
+        /// To modify move field declaration from designer file to code-behind file.
+        /// </remarks>
+        protected global::DotNetNuke.UI.UserControls.LabelControl lblName;
+        
+        /// <summary>
+        /// txtName control.
+        /// </summary>
+        /// <remarks>
+        /// Auto-generated field.
+        /// To modify move field declaration from designer file to code-behind file.
+        /// </remarks>
+        protected global::System.Web.UI.WebControls.TextBox txtName;
+        
+        /// <summary>
+        /// lblDescription control.
+        /// </summary>
+        /// <remarks>
+        /// Auto-generated field.
+        /// To modify move field declaration from designer file to code-behind file.
+        /// </remarks>
+        protected global::DotNetNuke.UI.UserControls.LabelControl lblDescription;
+        
+        /// <summary>
+        /// txtDescription control.
+        /// </summary>
+        /// <remarks>
+        /// Auto-generated field.
+        /// To modify move field declaration from designer file to code-behind file.
+        /// </remarks>
+        protected global::System.Web.UI.WebControls.TextBox txtDescription;
+        
+        /// <summary>
+        /// lblAssignedUser control.
+        /// </summary>
+        /// <remarks>
+        /// Auto-generated field.
+        /// To modify move field declaration from designer file to code-behind file.
+        /// </remarks>
+        protected global::DotNetNuke.UI.UserControls.LabelControl lblAssignedUser;
+        
+        /// <summary>
+        /// ddlAssignedUser control.
+        /// </summary>
+        /// <remarks>
+        /// Auto-generated field.
+        /// To modify move field declaration from designer file to code-behind file.
+        /// </remarks>
+        protected global::System.Web.UI.WebControls.DropDownList ddlAssignedUser;
+                
+        /// <summary>
+        /// btnSubmit control.
+        /// </summary>
+        /// <remarks>
+        /// Auto-generated field.
+        /// To modify move field declaration from designer file to code-behind file.
+        /// </remarks>
+        protected global::System.Web.UI.WebControls.LinkButton btnSubmit;
+        
+        /// <summary>
+        /// btnCancel control.
+        /// </summary>
+        /// <remarks>
+        /// Auto-generated field.
+        /// To modify move field declaration from designer file to code-behind file.
+        /// </remarks>
+        protected global::System.Web.UI.WebControls.LinkButton btnCancel;
+    }
+}

File VSIX/CSharp-DAL2-Template/Controls/Settings.ascx

+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Settings.ascx.cs" Inherits="$rootnamespace$$safeprojectname$.Controls.Settings" %>
+
+
+<!-- uncomment the code below to start using the DNN Form pattern to create and update settings -->
+<%--  
+
+<%@ Register TagName="label" TagPrefix="dnn" Src="~/controls/labelcontrol.ascx" %>
+
+	<h2 id="dnnSitePanel-BasicSettings" class="dnnFormSectionHead"><a href="" class="dnnSectionExpanded"><%=LocalizeString("BasicSettings")%></a></h2>
+	<fieldset>
+		<div class="dnnFormItem">
+			<dnn:Label ID="lblSetting1" runat="server" /> 
+ 
+			<asp:TextBox ID="txtSetting1" runat="server" />
+		</div>
+		<div class="dnnFormItem">
+			<dnn:label ID="lblSetting2" runat="server" />
+			<asp:TextBox ID="txtSetting2" runat="server" />
+		</div>
+	</fieldset>
+
+
+--%>

File VSIX/CSharp-DAL2-Template/Controls/Settings.ascx.cs

+/*
+' Copyright (c) $year$ $ownername$
+'  All rights reserved.
+' 
+' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
+' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+' DEALINGS IN THE SOFTWARE.
+' 
+*/
+
+using System;
+using DotNetNuke.Entities.Modules;
+using DotNetNuke.Services.Exceptions;
+
+namespace $rootnamespace$$safeprojectname$.Controls
+{
+	/// -----------------------------------------------------------------------------
+	/// <summary>
+	/// The Settings class manages Module Settings
+	/// 
+	/// Typically your settings control would be used to manage settings for your module.
+	/// There are two types of settings, ModuleSettings, and TabModuleSettings.
+	/// 
+	/// ModuleSettings apply to all "copies" of a module on a site, no matter which page the module is on. 
+	/// 
+	/// TabModuleSettings apply only to the current module on the current page, if you copy that module to
+	/// another page the settings are not transferred.
+	/// 
+	/// If you happen to save both TabModuleSettings and ModuleSettings, TabModuleSettings overrides ModuleSettings.
+	/// 
+	/// Below we have some examples of how to access these settings but you will need to uncomment to use.
+	/// 
+	/// Because the control inherits from $safeprojectname$SettingsBase you have access to any custom properties
+	/// defined there, as well as properties from DNN such as PortalId, ModuleId, TabId, UserId and many more.
+	/// </summary>
+	/// -----------------------------------------------------------------------------
+	public partial class Settings : $safeprojectname$ModuleSettingsBase
+	{
+		#region Base Method Implementations
+
+		/// -----------------------------------------------------------------------------
+		/// <summary>
+		/// LoadSettings loads the settings from the Database and displays them
+		/// </summary>
+		/// -----------------------------------------------------------------------------
+		public override void LoadSettings()
+		{
+			try
+			{
+				if (Page.IsPostBack == false)
+				{
+					//Check for existing settings and use those on this page
+					//Settings["SettingName"]
+
+					/* uncomment to load saved settings in the text boxes
+					if(Settings.Contains("Setting1"))
+						txtSetting1.Text = Settings["Setting1"].ToString();
+			
+					if (Settings.Contains("Setting2"))
+						txtSetting2.Text = Settings["Setting2"].ToString();
+
+					*/
+
+				}
+			}
+			catch (Exception exc) //Module failed to load
+			{
+				Exceptions.ProcessModuleLoadException(this, exc);
+			}
+		}
+
+		/// -----------------------------------------------------------------------------
+		/// <summary>
+		/// UpdateSettings saves the modified settings to the Database
+		/// </summary>
+		/// -----------------------------------------------------------------------------
+		public override void UpdateSettings()
+		{
+			try
+			{
+				var modules = new ModuleController();
+
+				//the following are two sample Module Settings, using the text boxes that are commented out in the ASCX file.
+				//module settings
+				//modules.UpdateModuleSetting(ModuleId, "Setting1", txtSetting1.Text);
+				//modules.UpdateModuleSetting(ModuleId, "Setting2", txtSetting2.Text);
+
+				//tab module settings
+				//modules.UpdateTabModuleSetting(TabModuleId, "Setting1", txtSetting1.Text);
+				//modules.UpdateTabModuleSetting(TabModuleId, "Setting2", txtSetting2.Text);
+			}
+			catch (Exception exc) //Module failed to load
+			{
+				Exceptions.ProcessModuleLoadException(this, exc);
+			}
+		}
+
+		#endregion
+	}
+}

File VSIX/CSharp-DAL2-Template/Controls/Settings.ascx.designer.cs

+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace $rootnamespace$$safeprojectname$.Controls
+{
+
+
+    public partial class Settings
+    {
+    }
+}

File VSIX/CSharp-DAL2-Template/Controls/View.ascx

+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="View.ascx.cs" Inherits="$rootnamespace$$safeprojectname$.Controls.View" %>
+<asp:Repeater ID="rptItemList" runat="server" OnItemDataBound="rptItemListOnItemDataBound"
+	OnItemCommand="rptItemListOnItemCommand">
+	<HeaderTemplate>
+		<ul class="tm_tl">
+	</HeaderTemplate>
+
+	<ItemTemplate>
+		<li class="tm_t">
+			<h3>
+				<asp:Label ID="lblitemName" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"ItemName").ToString() %>' />
+			</h3>
+			<asp:Label ID="lblItemDescription" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"ItemDescription").ToString() %>'
+				CssClass="tm_td" />
+
+			<asp:Panel ID="pnlAdmin" runat="server" Visible="false">
+				<asp:HyperLink ID="lnkEdit" runat="server" ResourceKey="EditItem.Text" Visible="false"
+					Enabled="false" />
+				<asp:LinkButton ID="lnkDelete" runat="server" ResourceKey="DeleteItem.Text" Visible="false"
+					Enabled="false" CommandName="Delete" />
+			</asp:Panel>
+		</li>
+	</ItemTemplate>
+	<FooterTemplate>
+		</ul>
+	</FooterTemplate>
+</asp:Repeater>

File VSIX/CSharp-DAL2-Template/Controls/View.ascx.cs

+/*
+' Copyright (c) $year$ $ownername$
+'  All rights reserved.
+' 
+' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
+' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+' DEALINGS IN THE SOFTWARE.
+' 
+*/
+
+using System;
+using System.Web.UI.WebControls;
+using $rootnamespace$$safeprojectname$.Components;
+using DotNetNuke.Security;
+using DotNetNuke.Services.Exceptions;
+using DotNetNuke.Entities.Modules;
+using DotNetNuke.Entities.Modules.Actions;
+using DotNetNuke.Services.Localization;
+using DotNetNuke.UI.Utilities;
+
+namespace $rootnamespace$$safeprojectname$.Controls
+{
+	/// -----------------------------------------------------------------------------
+	/// <summary>
+	/// The View class displays the content
+	/// 
+	/// Typically your view control would be used to display content or functionality in your module.
+	/// 
+	/// View may be the only control you have in your project depending on the complexity of your module
+	/// 
+	/// Because the control inherits from $safeprojectname$ModuleBase you have access to any custom properties
+	/// defined there, as well as properties from DNN such as PortalId, ModuleId, TabId, UserId and many more.
+	/// 
+	/// </summary>
+	/// -----------------------------------------------------------------------------
+	public partial class View : $safeprojectname$ModuleBase, IActionable
+	{
+		protected void Page_Load(object sender, EventArgs e)
+		{
+			try
+			{
+				var tc = new ItemController();
+				rptItemList.DataSource = tc.GetItems(ModuleId);
+				rptItemList.DataBind();
+			}
+			catch (Exception exc) //Module failed to load
+			{
+				Exceptions.ProcessModuleLoadException(this, exc);
+			}
+		}
+
+				protected void rptItemListOnItemDataBound(object sender, RepeaterItemEventArgs e)
+		{
+			if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
+			{
+				var lnkEdit = e.Item.FindControl("lnkEdit") as HyperLink;
+				var lnkDelete = e.Item.FindControl("lnkDelete") as LinkButton;
+
+				var pnlAdminControls = e.Item.FindControl("pnlAdmin") as Panel;
+
+				var t = (Item)e.Item.DataItem;
+
+				if (IsEditable && lnkDelete != null && lnkEdit != null && pnlAdminControls != null)
+				{
+					pnlAdminControls.Visible = true;
+					lnkDelete.CommandArgument = t.ItemId.ToString();
+					lnkDelete.Enabled = lnkDelete.Visible = lnkEdit.Enabled = lnkEdit.Visible = true;
+
+					lnkEdit.NavigateUrl = EditUrl(string.Empty, string.Empty, "Edit", "tid=" + t.ItemId);
+
+					ClientAPI.AddButtonConfirm(lnkDelete, Localization.GetString("ConfirmDelete", LocalResourceFile));
+				}
+				else
+				{
+					pnlAdminControls.Visible = false;
+				}
+			}
+		}
+
+
+		public void rptItemListOnItemCommand(object source, RepeaterCommandEventArgs e)
+		{
+			if (e.CommandName == "Edit")
+			{
+				Response.Redirect(EditUrl(string.Empty, string.Empty, "Edit", "tid=" + e.CommandArgument));
+			}
+
+			if (e.CommandName == "Delete")
+			{
+				var tc = new ItemController();
+				tc.DeleteItem(Convert.ToInt32(e.CommandArgument), ModuleId);
+			}
+			Response.Redirect(DotNetNuke.Common.Globals.NavigateURL());
+		}
+		
+		public ModuleActionCollection ModuleActions
+		{
+			get
+			{
+				var actions = new ModuleActionCollection
+					{
+						{
+							GetNextActionID(), Localization.GetString("EditModule", LocalResourceFile), "", "", "",
+							EditUrl(), false, SecurityAccessLevel.Edit, true, false
+						}
+					};
+				return actions;
+			}
+		}
+	}
+}

File VSIX/CSharp-DAL2-Template/Controls/View.ascx.designer.cs

+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace $rootnamespace$$safeprojectname$.Controls
+{
+
+
+    public partial class View
+    {
+        /// <summary>
+        /// rptItemList control.
+        /// </summary>
+        /// <remarks>
+        /// Auto-generated field.
+        /// To modify move field declaration from designer file to code-behind file.
+        /// </remarks>
+        protected global::System.Web.UI.WebControls.Repeater rptItemList;
+    }
+}

File VSIX/CSharp-DAL2-Template/Controls/module.css

Empty file added.

File VSIX/CSharp-DAL2-Template/DnnTemplate.csproj

 		<Compile Include="$safeprojectname$ModuleSettingsBase.cs">
 			<SubType>ASPXCodeBehind</SubType>
 		</Compile>
-		<Compile Include="Edit.ascx.cs">
-			<DependentUpon>Edit.ascx</DependentUpon>
-			<SubType>ASPXCodeBehind</SubType>
-		</Compile>
-		<Compile Include="Edit.ascx.designer.cs">
-			<DependentUpon>Edit.ascx</DependentUpon>
-		</Compile>
 		<Compile Include="Properties\AssemblyInfo.cs" />
-		<Compile Include="Settings.ascx.cs">
-			<DependentUpon>Settings.ascx</DependentUpon>
-			<SubType>ASPXCodeBehind</SubType>
-		</Compile>
-		<Compile Include="Settings.ascx.designer.cs">
-			<DependentUpon>Settings.ascx</DependentUpon>
-		</Compile>
-		<Compile Include="View.ascx.cs">
-			<DependentUpon>View.ascx</DependentUpon>
-			<SubType>ASPXCodeBehind</SubType>
-		</Compile>
-		<Compile Include="View.ascx.designer.cs">
-			<DependentUpon>View.ascx</DependentUpon>
-		</Compile>
 	</ItemGroup>
 	<ItemGroup>
 		<Content Include="Documentation\Documentation.css" />
 		<Content Include="Documentation\Documentation.html" />
-		<Content Include="Edit.ascx" />
 		<Content Include="License.txt" />
-		<Content Include="module.css" />
 		<Content Include="ReleaseNotes.txt" />
-		<Content Include="Settings.ascx" />
-		<Content Include="View.ascx" />
 	</ItemGroup>
 	<ItemGroup>
 		<Content Include="$safeprojectname$.dnn" />
 		<Content Include="BuildScripts\ModulePackage.targets" />
 	</ItemGroup>
 	<ItemGroup>
-		<Content Include="App_LocalResources\View.ascx.resx" />
+		<Content Include="Controls\View.ascx" />
+		<Content Include="Controls\Edit.ascx" />
+		<Content Include="Controls\Settings.ascx" />
+		<Content Include="Controls\module.css" />
 	</ItemGroup>
 	<ItemGroup>
-		<Content Include="App_LocalResources\Edit.ascx.resx" />
-		<Content Include="App_LocalResources\Settings.ascx.resx" />
+		<Compile Include="Controls\View.ascx.cs">
+			<DependentUpon>View.ascx</DependentUpon>
+			<SubType>ASPXCodeBehind</SubType>
+		</Compile>
+		<Compile Include="Controls\View.ascx.designer.cs">
+			<DependentUpon>View.ascx</DependentUpon>
+		</Compile>
+		<Compile Include="Controls\Edit.ascx.cs">
+			<DependentUpon>Edit.ascx</DependentUpon>
+			<SubType>ASPXCodeBehind</SubType>
+		</Compile>
+		<Compile Include="Controls\Edit.ascx.designer.cs">
+			<DependentUpon>Edit.ascx</DependentUpon>
+		</Compile>
+		<Compile Include="Controls\Settings.ascx.cs">
+			<DependentUpon>Settings.ascx</DependentUpon>
+			<SubType>ASPXCodeBehind</SubType>
+		</Compile>
+		<Compile Include="Controls\Settings.ascx.designer.cs">
+			<DependentUpon>Settings.ascx</DependentUpon>
+		</Compile>
+	</ItemGroup>
+	<ItemGroup>
+		<Content Include="Controls\App_LocalResources\View.ascx.resx" />
+		<Content Include="Controls\App_LocalResources\Edit.ascx.resx" />
+		<Content Include="Controls\App_LocalResources\Settings.ascx.resx" />
 	</ItemGroup>
 	<ItemGroup>
 		<Content Include="Providers\DataProviders\SqlDataProvider\00.00.01.sql" />
 		<Content Include="Providers\DataProviders\SqlDataProvider\Uninstall.sql" />
+		<Content Include="Providers\DataProviders\SqlDataProvider\install-naming-fix.sql" />
 	</ItemGroup>
 	<PropertyGroup>
 		<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>

File VSIX/CSharp-DAL2-Template/DnnTemplate.dnn

 						<script type="UnInstall">
 							<path>Providers\DataProviders\SqlDataProvider</path>
 							<name>Uninstall.sql</name>
-							<version>00.00.01</version>
 						</script>
 					</scripts>
 				</component>
 				<component type="Module">
 					<desktopModule>
 						<moduleName>$safeprojectname$</moduleName>
-						<foldername>$safeprojectname$</foldername>
+						<foldername>$safeprojectname$/Controls</foldername>
 						<businessControllerClass>$rootnamespace$$safeprojectname$.Components.FeatureController</businessControllerClass>
 						<supportedFeatures />
 						<moduleDefinitions>
 								<moduleControls>
 									<moduleControl>
 										<controlKey />
-										<controlSrc>DesktopModules/$safeprojectname$/View.ascx</controlSrc>
+										<controlSrc>DesktopModules/$safeprojectname$/Controls/View.ascx</controlSrc>
 										<supportsPartialRendering>False</supportsPartialRendering>
 										<controlTitle />
 										<controlType>View</controlType>
 									</moduleControl>
 									<moduleControl>
 										<controlKey>Edit</controlKey>
-										<controlSrc>DesktopModules/$safeprojectname$/Edit.ascx</controlSrc>
+										<controlSrc>DesktopModules/$safeprojectname$/Controls/Edit.ascx</controlSrc>
 										<supportsPartialRendering>False</supportsPartialRendering>
 										<controlTitle>Edit Content</controlTitle>
 										<controlType>Edit</controlType>
 									</moduleControl>
 									<moduleControl>
 										<controlKey>Settings</controlKey>
-										<controlSrc>DesktopModules/$safeprojectname$/Settings.ascx</controlSrc>
+										<controlSrc>DesktopModules/$safeprojectname$/Controls/Settings.ascx</controlSrc>
 										<supportsPartialRendering>False</supportsPartialRendering>
 										<controlTitle>$safeprojectname$ Settings</controlTitle>
 										<controlType>Edit</controlType>
 						</assembly>
 					</assemblies>
 				</component>
+				
+				<!-- the last thing we do is fix "FriendlyName" of all the modules we installed, since DNN messes them up bye default -->
+				<component type="Script">
+					<scripts>
+						<basePath>DesktopModules\multicontroltest</basePath>
+						<script type="Install">
+							<path>Providers\DataProviders\SqlDataProvider</path>
+							<name>install-naming-fix.sql</name>
+						</script>
+					</scripts>
+				</component>
 			</components>
 		</package>
 	</packages>

File VSIX/CSharp-DAL2-Template/Edit.ascx

-<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Edit.ascx.cs" Inherits="$rootnamespace$$safeprojectname$.Edit" %>
-<%@ Register TagPrefix="dnn" TagName="label" Src="~/controls/LabelControl.ascx" %>
-<div class="dnnForm dnnEditBasicSettings" id="dnnEditBasicSettings">
-	<div class="dnnFormExpandContent dnnRight ">
-		<a href=""><%=LocalizeString("ExpandAll")%></a>
-	</div>
-
-	<h2 id="dnnSitePanel-BasicSettings" class="dnnFormSectionHead dnnClear">
-		<a href="" class="dnnSectionExpanded">
-			<%=LocalizeString("BasicSettings")%></a>
-	</h2>
-	<fieldset>
-		<div class="dnnFormItem">
-			<dnn:label ID="lblName" runat="server" />
-			<asp:TextBox ID="txtName" runat="server" />
-		</div>
-		<div class="dnnFormItem">
-
-			<dnn:label ID="lblDescription" runat="server" />
-			<asp:TextBox ID="txtDescription" runat="server" TextMode="MultiLine" Rows="5" Columns="20" />
-		</div>
-		<div class="dnnFormItem">
-			<dnn:label ID="lblAssignedUser" runat="server" />
-			<asp:DropDownList ID="ddlAssignedUser" runat="server" />
-		</div>
-	</fieldset>
-</div>
-<asp:LinkButton ID="btnSubmit" runat="server"
-	OnClick="btnSubmit_Click" resourcekey="btnSubmit" CssClass="dnnPrimaryAction" />
-<asp:LinkButton ID="btnCancel" runat="server"
-	OnClick="btnCancel_Click" resourcekey="btnCancel" CssClass="dnnSecondaryAction" />
-
-<script language="javascript" type="text/javascript">
-	/*globals jQuery, window, Sys */
-	(function ($, Sys) {
-		function dnnEditBasicSettings() {
-			$('#dnnEditBasicSettings').dnnPanels();
-			$('#dnnEditBasicSettings .dnnFormExpandContent a').dnnExpandAll({ expandText: '<%=Localization.GetString("ExpandAll", LocalResourceFile)%>', collapseText: '<%=Localization.GetString("CollapseAll", LocalResourceFile)%>', targetArea: '#dnnEditBasicSettings' });
-		}
-
-		$(document).ready(function () {
-			dnnEditBasicSettings();
-			Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function () {
-				dnnEditBasicSettings();
-			});
-		});
-
-	}(jQuery, window.Sys));
-</script>
-

File VSIX/CSharp-DAL2-Template/Edit.ascx.cs

-/*
-' Copyright (c) $year$ $ownername$
-'  All rights reserved.
-' 
-' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-' DEALINGS IN THE SOFTWARE.
-' 
-*/
-
-using System;
-using DotNetNuke.Entities.Users;
-using $rootnamespace$$safeprojectname$.Components;
-using DotNetNuke.Services.Exceptions;
-
-namespace $rootnamespace$$safeprojectname$
-{
-	/// -----------------------------------------------------------------------------
-	/// <summary>
-	/// The Edit class is used to manage content
-	/// 
-	/// Typically your edit control would be used to create new content, or edit existing content within your module.
-	/// The ControlKey for this control is "Edit", and is defined in the manifest (.dnn) file.
-	/// 
-	/// Because the control inherits from $safeprojectname$ModuleBase you have access to any custom properties
-	/// defined there, as well as properties from DNN such as PortalId, ModuleId, TabId, UserId and many more.
-	/// 
-	/// </summary>
-	/// -----------------------------------------------------------------------------
-	public partial class Edit : $safeprojectname$ModuleBase
-	{
-		protected void Page_Load(object sender, EventArgs e)
-		{
-			try
-			{
-				//Implement your edit logic for your module
-				if (!Page.IsPostBack)
-				{
-					//get a list of users to assign the user to the Object
-					ddlAssignedUser.DataSource = UserController.GetUsers(PortalId);
-					ddlAssignedUser.DataTextField = "Username";
-					ddlAssignedUser.DataValueField = "UserId";
-					ddlAssignedUser.DataBind();
-
-					//check if we have an ID passed in via a querystring parameter, if so, load that item to edit.
-					//ItemId is defined in the ItemModuleBase.cs file
-					if (ItemId > 0)
-					{
-						var tc = new ItemController();
-
-						var t = tc.GetItem(ItemId, ModuleId);
-						if (t != null)
-						{
-							txtName.Text = t.ItemName;
-							txtDescription.Text = t.ItemDescription;
-							ddlAssignedUser.Items.FindByValue(t.AssignedUserId.ToString()).Selected = true;
-						}
-					}
-				}
-			}
-			catch (Exception exc) //Module failed to load
-			{
-				Exceptions.ProcessModuleLoadException(this, exc);
-			}
-		}
-	
-
-		protected void btnSubmit_Click(object sender, EventArgs e)
-		{
-			var t = new Item();
-			var tc = new ItemController();
-
-			if (ItemId > 0)
-			{
-				t = tc.GetItem(ItemId, ModuleId);
-				t.ItemName = txtName.Text.Trim();
-				t.ItemDescription = txtDescription.Text.Trim();
-				t.LastModifiedByUserId = UserId;
-				t.LastModifiedOnDate = DateTime.Now;
-				t.AssignedUserId = Convert.ToInt32(ddlAssignedUser.SelectedValue);
-			}
-			else
-			{
-				t = new Item()
-				{
-					AssignedUserId = Convert.ToInt32(ddlAssignedUser.SelectedValue),
-					CreatedByUserId = UserId,
-					CreatedOnDate = DateTime.Now,
-					ItemName = txtName.Text.Trim(),
-					ItemDescription = txtDescription.Text.Trim(),
-					
-				};
-			}
-
-			t.LastModifiedOnDate = DateTime.Now;
-			t.LastModifiedByUserId = UserId;
-			t.ModuleId = ModuleId;
-
-			if (t.ItemId > 0)
-			{
-				tc.UpdateItem(t);
-			}
-			else
-			{
-				tc.CreateItem(t);
-			}
-			Response.Redirect(DotNetNuke.Common.Globals.NavigateURL());
-		}
-
-		protected void btnCancel_Click(object sender, EventArgs e)
-		{
-			Response.Redirect(DotNetNuke.Common.Globals.NavigateURL());
-		}
-	}
-}

File VSIX/CSharp-DAL2-Template/Edit.ascx.designer.cs

-//------------------------------------------------------------------------------
-// <auto-generated>
-//     This code was generated by a tool.
-//
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace $rootnamespace$$safeprojectname$
-{
-
-
-        public partial class Edit {
-        
-        /// <summary>
-        /// lblName control.
-        /// </summary>
-        /// <remarks>
-        /// Auto-generated field.
-        /// To modify move field declaration from designer file to code-behind file.
-        /// </remarks>
-        protected global::DotNetNuke.UI.UserControls.LabelControl lblName;
-        
-        /// <summary>
-        /// txtName control.
-        /// </summary>
-        /// <remarks>
-        /// Auto-generated field.
-        /// To modify move field declaration from designer file to code-behind file.
-        /// </remarks>
-        protected global::System.Web.UI.WebControls.TextBox txtName;
-        
-        /// <summary>
-        /// lblDescription control.
-        /// </summary>
-        /// <remarks>
-        /// Auto-generated field.
-        /// To modify move field declaration from designer file to code-behind file.
-        /// </remarks>
-        protected global::DotNetNuke.UI.UserControls.LabelControl lblDescription;
-        
-        /// <summary>
-        /// txtDescription control.
-        /// </summary>
-        /// <remarks>
-        /// Auto-generated field.
-        /// To modify move field declaration from designer file to code-behind file.
-        /// </remarks>
-        protected global::System.Web.UI.WebControls.TextBox txtDescription;
-        
-        /// <summary>
-        /// lblAssignedUser control.
-        /// </summary>
-        /// <remarks>
-        /// Auto-generated field.
-        /// To modify move field declaration from designer file to code-behind file.
-        /// </remarks>
-        protected global::DotNetNuke.UI.UserControls.LabelControl lblAssignedUser;
-        
-        /// <summary>
-        /// ddlAssignedUser control.
-        /// </summary>
-        /// <remarks>
-        /// Auto-generated field.
-        /// To modify move field declaration from designer file to code-behind file.
-        /// </remarks>
-        protected global::System.Web.UI.WebControls.DropDownList ddlAssignedUser;
-                
-        /// <summary>
-        /// btnSubmit control.
-        /// </summary>
-        /// <remarks>
-        /// Auto-generated field.
-        /// To modify move field declaration from designer file to code-behind file.
-        /// </remarks>
-        protected global::System.Web.UI.WebControls.LinkButton btnSubmit;
-        
-        /// <summary>
-        /// btnCancel control.
-        /// </summary>
-        /// <remarks>
-        /// Auto-generated field.
-        /// To modify move field declaration from designer file to code-behind file.
-        /// </remarks>
-        protected global::System.Web.UI.WebControls.LinkButton btnCancel;
-    }
-}

File VSIX/CSharp-DAL2-Template/Providers/DataProviders/SqlDataProvider/install-naming-fix.sql

+/************************************************************/
+/*****              SqlDataProvider                     *****/
+/*****                                                  *****/
+/*****                                                  *****/
+/***** Note: To manually execute this script you must   *****/
+/*****       perform a search and replace operation     *****/
+/*****       for {databaseOwner} and {objectQualifier}  *****/
+/*****                                                  *****/
+/************************************************************/
+
+UPDATE
+	dm
+SET
+	-- this is the module's unique name, which DNN, in all their royal wiseness, decided to save as the package's name...
+	dm.FriendlyName = dm.ModuleName
+FROM
+	{databaseOwner}[{objectQualifier}Packages] AS p
+	INNER JOIN {databaseOwner}[{objectQualifier}DesktopModules] AS dm ON dm.PackageID = p.PackageID
+WHERE
+	-- dont really need this many conditionals, but we want to be sure not to update other devs' modules..
+	-- NOTE: be sure to update these when you change your .dnn!!!
+	p.[Name] = '$safeprojectname$'
+	AND p.FriendlyName = '$safeprojectname$'
+	AND p.PackageType = 'Module'
+	AND p.[Owner] = '$ownername$'
+
+
+GO
+/************************************************************/
+/*****              SqlDataProvider                     *****/
+/************************************************************/

File VSIX/CSharp-DAL2-Template/Settings.ascx

-<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Settings.ascx.cs" Inherits="$rootnamespace$$safeprojectname$.Settings" %>
-
-
-<!-- uncomment the code below to start using the DNN Form pattern to create and update settings -->
-<%--  
-
-<%@ Register TagName="label" TagPrefix="dnn" Src="~/controls/labelcontrol.ascx" %>
-
-	<h2 id="dnnSitePanel-BasicSettings" class="dnnFormSectionHead"><a href="" class="dnnSectionExpanded"><%=LocalizeString("BasicSettings")%></a></h2>
-	<fieldset>
-		<div class="dnnFormItem">
-			<dnn:Label ID="lblSetting1" runat="server" /> 
- 
-			<asp:TextBox ID="txtSetting1" runat="server" />
-		</div>
-		<div class="dnnFormItem">
-			<dnn:label ID="lblSetting2" runat="server" />
-			<asp:TextBox ID="txtSetting2" runat="server" />
-		</div>
-	</fieldset>
-
-
---%>

File VSIX/CSharp-DAL2-Template/Settings.ascx.cs

-/*
-' Copyright (c) $year$ $ownername$
-'  All rights reserved.
-' 
-' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-' DEALINGS IN THE SOFTWARE.
-' 
-*/
-
-using System;
-using DotNetNuke.Entities.Modules;
-using DotNetNuke.Services.Exceptions;
-
-namespace $rootnamespace$$safeprojectname$
-{
-	/// -----------------------------------------------------------------------------
-	/// <summary>
-	/// The Settings class manages Module Settings
-	/// 
-	/// Typically your settings control would be used to manage settings for your module.
-	/// There are two types of settings, ModuleSettings, and TabModuleSettings.
-	/// 
-	/// ModuleSettings apply to all "copies" of a module on a site, no matter which page the module is on. 
-	/// 
-	/// TabModuleSettings apply only to the current module on the current page, if you copy that module to
-	/// another page the settings are not transferred.
-	/// 
-	/// If you happen to save both TabModuleSettings and ModuleSettings, TabModuleSettings overrides ModuleSettings.
-	/// 
-	/// Below we have some examples of how to access these settings but you will need to uncomment to use.
-	/// 
-	/// Because the control inherits from $safeprojectname$SettingsBase you have access to any custom properties
-	/// defined there, as well as properties from DNN such as PortalId, ModuleId, TabId, UserId and many more.
-	/// </summary>
-	/// -----------------------------------------------------------------------------
-	public partial class Settings : $safeprojectname$ModuleSettingsBase
-	{
-		#region Base Method Implementations
-
-		/// -----------------------------------------------------------------------------
-		/// <summary>
-		/// LoadSettings loads the settings from the Database and displays them
-		/// </summary>
-		/// -----------------------------------------------------------------------------
-		public override void LoadSettings()
-		{
-			try
-			{
-				if (Page.IsPostBack == false)
-				{
-					//Check for existing settings and use those on this page
-					//Settings["SettingName"]
-
-					/* uncomment to load saved settings in the text boxes
-					if(Settings.Contains("Setting1"))
-						txtSetting1.Text = Settings["Setting1"].ToString();
-			
-					if (Settings.Contains("Setting2"))
-						txtSetting2.Text = Settings["Setting2"].ToString();
-
-					*/
-
-				}
-			}
-			catch (Exception exc) //Module failed to load
-			{
-				Exceptions.ProcessModuleLoadException(this, exc);
-			}
-		}
-
-		/// -----------------------------------------------------------------------------
-		/// <summary>
-		/// UpdateSettings saves the modified settings to the Database
-		/// </summary>
-		/// -----------------------------------------------------------------------------
-		public override void UpdateSettings()
-		{
-			try
-			{
-				var modules = new ModuleController();
-
-				//the following are two sample Module Settings, using the text boxes that are commented out in the ASCX file.
-				//module settings
-				//modules.UpdateModuleSetting(ModuleId, "Setting1", txtSetting1.Text);
-				//modules.UpdateModuleSetting(ModuleId, "Setting2", txtSetting2.Text);
-
-				//tab module settings
-				//modules.UpdateTabModuleSetting(TabModuleId, "Setting1", txtSetting1.Text);
-				//modules.UpdateTabModuleSetting(TabModuleId, "Setting2", txtSetting2.Text);
-			}
-			catch (Exception exc) //Module failed to load
-			{
-				Exceptions.ProcessModuleLoadException(this, exc);
-			}
-		}
-
-		#endregion
-	}
-}

File VSIX/CSharp-DAL2-Template/Settings.ascx.designer.cs

-//------------------------------------------------------------------------------
-// <auto-generated>
-//     This code was generated by a tool.
-//
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace $rootnamespace$$safeprojectname$
-{
-
-
-    public partial class Settings
-    {
-    }
-}

File VSIX/CSharp-DAL2-Template/View.ascx

-<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="View.ascx.cs" Inherits="$rootnamespace$$safeprojectname$.View" %>
-<asp:Repeater ID="rptItemList" runat="server" OnItemDataBound="rptItemListOnItemDataBound"
-	OnItemCommand="rptItemListOnItemCommand">
-	<HeaderTemplate>
-		<ul class="tm_tl">
-	</HeaderTemplate>
-
-	<ItemTemplate>
-		<li class="tm_t">
-			<h3>
-				<asp:Label ID="lblitemName" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"ItemName").ToString() %>' />
-			</h3>
-			<asp:Label ID="lblItemDescription" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"ItemDescription").ToString() %>'
-				CssClass="tm_td" />
-
-			<asp:Panel ID="pnlAdmin" runat="server" Visible="false">
-				<asp:HyperLink ID="lnkEdit" runat="server" ResourceKey="EditItem.Text" Visible="false"
-					Enabled="false" />
-				<asp:LinkButton ID="lnkDelete" runat="server" ResourceKey="DeleteItem.Text" Visible="false"
-					Enabled="false" CommandName="Delete" />
-			</asp:Panel>
-		</li>
-	</ItemTemplate>
-	<FooterTemplate>
-		</ul>
-	</FooterTemplate>
-</asp:Repeater>

File VSIX/CSharp-DAL2-Template/View.ascx.cs

-/*
-' Copyright (c) $year$ $ownername$
-'  All rights reserved.
-' 
-' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-' DEALINGS IN THE SOFTWARE.
-' 
-*/
-
-using System;
-using System.Web.UI.WebControls;
-using $rootnamespace$$safeprojectname$.Components;
-using DotNetNuke.Security;
-using DotNetNuke.Services.Exceptions;
-using DotNetNuke.Entities.Modules;
-using DotNetNuke.Entities.Modules.Actions;
-using DotNetNuke.Services.Localization;
-using DotNetNuke.UI.Utilities;
-
-namespace $rootnamespace$$safeprojectname$
-{
-	/// -----------------------------------------------------------------------------
-	/// <summary>
-	/// The View class displays the content
-	/// 
-	/// Typically your view control would be used to display content or functionality in your module.
-	/// 
-	/// View may be the only control you have in your project depending on the complexity of your module
-	/// 
-	/// Because the control inherits from $safeprojectname$ModuleBase you have access to any custom properties
-	/// defined there, as well as properties from DNN such as PortalId, ModuleId, TabId, UserId and many more.
-	/// 
-	/// </summary>
-	/// -----------------------------------------------------------------------------
-	public partial class View : $safeprojectname$ModuleBase, IActionable
-	{
-		protected void Page_Load(object sender, EventArgs e)
-		{
-			try
-			{
-				var tc = new ItemController();
-				rptItemList.DataSource = tc.GetItems(ModuleId);
-				rptItemList.DataBind();
-			}
-			catch (Exception exc) //Module failed to load
-			{
-				Exceptions.ProcessModuleLoadException(this, exc);
-			}
-		}
-
-				protected void rptItemListOnItemDataBound(object sender, RepeaterItemEventArgs e)
-		{
-			if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
-			{
-				var lnkEdit = e.Item.FindControl("lnkEdit") as HyperLink;
-				var lnkDelete = e.Item.FindControl("lnkDelete") as LinkButton;
-
-				var pnlAdminControls = e.Item.FindControl("pnlAdmin") as Panel;
-
-				var t = (Item)e.Item.DataItem;
-
-				if (IsEditable && lnkDelete != null && lnkEdit != null && pnlAdminControls != null)
-				{
-					pnlAdminControls.Visible = true;
-					lnkDelete.CommandArgument = t.ItemId.ToString();
-					lnkDelete.Enabled = lnkDelete.Visible = lnkEdit.Enabled = lnkEdit.Visible = true;
-
-					lnkEdit.NavigateUrl = EditUrl(string.Empty, string.Empty, "Edit", "tid=" + t.ItemId);
-
-					ClientAPI.AddButtonConfirm(lnkDelete, Localization.GetString("ConfirmDelete", LocalResourceFile));
-				}
-				else
-				{
-					pnlAdminControls.Visible = false;
-				}
-			}
-		}
-
-
-		public void rptItemListOnItemCommand(object source, RepeaterCommandEventArgs e)
-		{
-			if (e.CommandName == "Edit")
-			{
-				Response.Redirect(EditUrl(string.Empty, string.Empty, "Edit", "tid=" + e.CommandArgument));
-			}
-
-			if (e.CommandName == "Delete")
-			{
-				var tc = new ItemController();
-				tc.DeleteItem(Convert.ToInt32(e.CommandArgument), ModuleId);
-			}
-			Response.Redirect(DotNetNuke.Common.Globals.NavigateURL());
-		}
-		
-		public ModuleActionCollection ModuleActions
-		{
-			get
-			{
-				var actions = new ModuleActionCollection
-					{
-						{
-							GetNextActionID(), Localization.GetString("EditModule", LocalResourceFile), "", "", "",
-							EditUrl(), false, SecurityAccessLevel.Edit, true, false
-						}
-					};
-				return actions;
-			}
-		}
-	}
-}

File VSIX/CSharp-DAL2-Template/View.ascx.designer.cs

-//------------------------------------------------------------------------------
-// <auto-generated>
-//     This code was generated by a tool.
-//
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace $rootnamespace$$safeprojectname$
-{
-
-
-    public partial class View
-    {
-        /// <summary>
-        /// rptItemList control.
-        /// </summary>
-        /// <remarks>
-        /// Auto-generated field.
-        /// To modify move field declaration from designer file to code-behind file.
-        /// </remarks>
-        protected global::System.Web.UI.WebControls.Repeater rptItemList;
-    }
-}

File VSIX/CSharp-DAL2-Template/module.css

Empty file removed.