Software Requirement
- Visual Studio 2012 Express
- SQL Server Express
- DotNetNuke Module Template for 2012 ( DNNTemplates )
Setup
- Install Visual Studio Express if you haven't already done.
- Install SQL Server Express if you haven't already done.
- Install DNNTemplates.
Steps To Create Custom Module
- Open Visual Studio 2012.
Go to File, New, then Project,
- Select Appropriate Module Template form installed template. Specify Appropriate Module name and Folder location.
- Click OK button. It starts creating the project and at the end it shows the following error message.
- To resolve this error, we need to make changes in solution file of created module.
Click TestingModule.csproj file in Visual Studio.
- Make the following changes in TestingModule.csproj file.
- IISUrl
- IISAppRootUrl
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{31-65df-11da-9384-00065123321}">
- <WebProjectProperties>
- <UseIIS>True</UseIIS>
- <AutoAssignPort>False</AutoAssignPort>
- <DevelopmentServerPort>0</DevelopmentServerPort>
- <DevelopmentServerVPath>
- </DevelopmentServerVPath>
- <IISUrl>http:
- <OverrideIISAppRootUrl>True</OverrideIISAppRootUrl>
- <IISAppRootUrl>http:
- <NTLMAuthentication>False</NTLMAuthentication>
- <UseCustomServer>False</UseCustomServer>
- <CustomServerUrl>
- </CustomServerUrl>
- <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
- </WebProjectProperties>
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
- Open separate instance of custom module project in separate visual studio, so that we make coding changes.
- Steps to build complete DotNetNuke project along with custom module.
- Build TestingModule Project.
- Rebuild Main Solution of DotNetNuke Project.
- Run the solution in VS 2012.
- Login into DotNetNuke application.
- Sign in into DotNetNuke.
Integration of custom module in DotNetNuke project
- Run Sql Script.
- Go to TestingModule Folder in Main Solution.
- Go to Providers, DataProviders, SqlDataProvider - 00.00.01.SqlDataProvider.
- Click 00.00.01.SqlDataProvider file having Sql queries.
- Go to Host -> SQL.
- Paste SQL query in the following window.
- Add Custom Module.
- Go to Host -> Extension.
- Select Create New Module.
- Select appropriate option to create new Custom module. Click Create Module button.
- After Custom module created, it shows newly created module at extension page.
- Test Page added into application.
- Add Module on test page as follow:
- Go to Module -> Add New Module.
- Drag and drop module on test page.
- When settings are correct, it will show you ‘add item’ option on test page.
- In case some settings are incorrect it will not show you add item option on test page, in that case we need to change your setting of Custom module.
- Go to Host -> Extension.
- Go to custom module we added in list.
- Select Edit option.
- Please check Module Control section properly as show in figure.
!!! Happy Coding !!!