[ Foro de C# ]
/*
' Copyright (c) 2015 Christoc.com
' 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.Security;
using DotNetNuke.Services.Exceptions;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Entities.Modules.Actions;
using DotNetNuke.Services.Localization;
using System.Collections.Specialized;
namespace Christoc.Modules.BB_FE_Peru_Attractions
{
/// -----------------------------------------------------------------------------
/// <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 BB_FE_Peru_AttractionsModuleBase 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 : BB_FE_Peru_AttractionsModuleBase, IActionable
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
bool PagoLoad = true;
NameValueCollection queryString = new NameValueCollection(Request.QueryString);
if (this.PortalId == 1 || this.PortalId == 2 || this.PortalId == 4 || this.PortalId == 3
|| this.PortalId == 6 || this.PortalId == 8 || this.PortalId == 10 || this.PortalId == 13 || this.PortalId == 11 || this.PortalId == 54)
{
if (queryString.Count > 1)
{
PagoLoad = false;
}
if (queryString["destId"].Length>0)
{
PagoLoad = true;
}
}
else if (this.PortalId == 5 || this.PortalId == 52 || this.PortalId == 12 || this.PortalId == 53)
{
if (queryString.Count > 2)
{
PagoLoad = false;
}
if (queryString["destId"].Length > 0)
{
PagoLoad = true;
}
}
else
{
Response.Write(queryString.Count);
}
var controlToLoad = string.Empty;
// Vista Buscar
if (PagoLoad)
{
controlToLoad = "Controls/Lista.ascx";
}
else
{
controlToLoad = "Controls/AtractionsDetails.ascx";
}
//Agregando la vista en el view
var mbl = (BB_FE_Peru_AttractionsModuleBase)LoadControl(controlToLoad);
mbl.ModuleConfiguration = ModuleConfiguration;
mbl.ID = System.IO.Path.GetFileNameWithoutExtension(controlToLoad);
List.Controls.Add(mbl); //Agregado
}
catch (Exception exc) //Module failed to load
{
Response.Write(exc.ToString());
Exceptions.ProcessModuleLoadException(this, exc);
}
}
public ModuleActionCollection ModuleActions
{
get
{
var actions = new ModuleActionCollection
{
{
GetNextActionID(), Localization.GetString("EditModule", LocalResourceFile), "", "", "",
EditUrl(), false, SecurityAccessLevel.Edit, true, false
}
};
return actions;
}
}
}
}
Buenas tengo un proyecto que trabaja en acsx y usa 2 controles el problema es que no encuentro la manera de que reconozca la segunda vista que seria la de detalles "AtractionsDetails" despues de irme al href de mi pagina me manda a una pagina vacia estoy haciendo un proyecto dotnetnuke
(No se puede continuar esta discusión porque tiene más de dos meses de antigüedad. Si tienes dudas parecidas, abre un nuevo hilo.)