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