Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Getting StartedGetting StartedMVC moduleMVC module
Previous
 
Next
New Post
5/11/2016 7:31 AM
 

Hello everybody,

I want to create an mvc module using DNN8 .Someone can help me pelase !

what are the steps to create an mvc module !

Can someone provides me with example !

 
New Post
5/17/2016 12:00 PM
 

Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
5/17/2016 8:22 PM
 

Ash Prasad
Director of Engineering
DNN Corp.
 
New Post
5/18/2016 3:51 AM
 

Hi Chris,

I'm using your beautiful template. The last is better than previous, the wizard is great!

I can do almost everything with that, but in same case I can't full manage the Action return: in my controllers, sometimes, I need to return not a View but a simple data value (ex. a string, or an array, or an integer) and when I do that the Controller returns to me not only the data value but append all document HTML code to that.

This is a controller (DnnController) action example:

public ContentResult SaveFiles(IEnumerable<HttpPostedFileBase> files)

        {

            // The Name of the Upload component is "files"

            if (files != null)

            {

                foreach (var file in files)

                {

                    // Some browsers send file names with full path. This needs to be stripped.

                    var fileName = Path.GetFileName(file.FileName);

                    var physicalPath = Path.Combine(Server.MapPath("~/Portals/0/Images"), fileName);


                    // The files are not actually saved in this demo

                    file.SaveAs(physicalPath);

                }

            }


            // Return an empty string to signify success

            return Content("test");

        }


And this is the response that I receive:

test<!DOCTYPE html>

<html  lang="it-IT">

<head id="Head">

<!--*********************************************-->

<!-- DNN Platform - http://www.dnnsoftware.com   -->

<!-- Copyright (c) 2002-2015, by DNN Corporation -->

<!--*********************************************-->

<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /><title>

Amministrazione

</title><meta id="MetaKeywords" name="KEYWORDS" content=",DotNetNuke,DNN" /><meta id="MetaGenerator" name="GENERATOR" content="DotNetNuke " /><meta id="MetaRobots" name="ROBOTS" content="INDEX, FOLLOW" /><link href="/Resources/Shared/stylesheets/dnndefault/7.0.0/default.css?cdv=61" type="text/css" rel="stylesheet"/><link href="/DesktopModules/MVC/ITCMRoutesManager/module.css?cdv=61" type="text/css" rel="stylesheet"/><link href="/Resources/Search/SearchSkinObjectPreview.css?cdv=61" type="text/css" rel="stylesheet"/><link href="/Portals/_default/Skins/Xcillion/bootstrap/css/bootstrap.min.css?cdv=61" type="text/css" rel="stylesheet"/><link href="/Portals/_default/Skins/Xcillion/css/jquery.smartmenus.bootstrap.css?cdv=61" type="text/css" rel="stylesheet"/><link href="/Portals/_default/Skins/Xcillion/Menus/MainMenu/MainMenu.css?cdv=61" type="text/css" rel="stylesheet"/><link href="/Portals/_default/Skins/Xcillion/skin.css?cdv=61" type="text/css" rel="stylesheet"/><link href="/Portals/0/portal.css?cdv=61" type="text/css" rel="stylesheet"/><script src="/Resources/libraries/jQuery/01_09_01/jquery.js?cdv=61" type="text/javascript"></script><script src="/Resources/libraries/jQuery-UI/01_11_03/jquery-ui.js?cdv=61" type="text/javascript"></script><meta name="viewport" content="width=device-width,initial-scale=1" /></head>

<body id="Body">

    

    <form method="post" action="/it-it/Administration/moduleId/2427/controller/Routes/action/SaveFiles" id="Form" enctype="multipart/form-data">

<div class="aspNetHidden">

<input type="hidden" name="StylesheetManager_TSSM" id="StylesheetManager_TSSM" value="" />

<input type="hidden" name="ScriptManager_TSM" id="ScriptManager_TSM" value="" />

<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />

<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />

<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="EnQU5QoE065HQTLWqSunX8jn6DuhLzH8msUG3iXt67jn0z3nC+CcXo7xomViyz4h4tSaeiuxeTsMdvva0g8c8341AhK0LUBD7mVVqb9xflZZNmWcbCY7EgdedkiXkctpIKgzj4qCBMx/LmJb7khTYZEGVd7S9sRnPLPb9whlz217Gi1SAM8joYVXoX154UuEmF+K6MfMgczHrYE6LYY60xPHJUF5WjOzmh/ZV7a0WRMJ8XFbNML2cKgTTbiju1/k73w7gzgEXJxowjFHO2h7JL0h8eOoXZzWbSL/IkZAKGCWUDs4" />

</div>

[.....]

 

Instead I like to receive only the string "test"....

 

Hope you can help me, 

 

Thank you

 

Matteo

 

 
New Post
5/24/2016 6:52 AM
 

HI Shaymaa,

I have the same issues, return the string with additional HTML, have you found the solution on that?

Thanks

Sky

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Getting StartedGetting StartedMVC moduleMVC module


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out