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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How to use Custom ASPX pagesHow to use Custom ASPX pages
Previous
 
Next
New Post
1/12/2006 8:07 PM
 

I created a new ASPX page, and put it into the Admin folder of the project (because I know that Admin is a reserved word in DNN and you can access that folder from the Url).  I put this code in the page:

Partial Class admin_MyPage
   Inherits DotNetNuke.Framework.PageBase

      Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

      Dim objUserInfo As UserInfo = UserController.GetCurrentUserInfo

      Response.Write("username: " & objUserInfo.Username & "<br>")
      Response.Write(
"portalId: " & PortalSettings.PortalId)

   End Sub

End Class

-I save the code creating the page as described above
-I go into a child portal (or any portal really) such as  localhost/Test   I put an IFrame module on the home page.
-I then put his path in the IFrame Modlue:  http://localhost/admin/MyPage.aspx  (note that the regex filter prevents this entry so you have to yank that from the IFrame control code OR put this value into the DB directly

now, when I load my portal home page, the Iframe comes up, and shows my nifty page inside, which is SUPPOSED to show me username and portal ID.  However... it just doesnt work right.  No matter what I do, I get username blank, and portalID 0, whether logged in, or on portal 0 or not.  and worse, it logs me out if I hit the home page containing this IFrame! Any time MyPage.aspx is loaded, it wipes out all portal and user knowledge.  Whats the deal????

I am not thinking this is an IFrame problem, but some kind of core functionality I have not used properly, or cant use.  And in fact, the same issues ocurrs when not using IFrames at all. What is the deal with creating custom pages, inheriting the base class, and getting the proper values?

Bottom line:  I am trying to create a DNN project that has some custom ASPX pages without the skins and features, BUT that have the portal and user objects in them.  Ideally, these pages would be used in Iframes (not necessarily the IFrame module) so that I can use it in Dialog type windows I am building for my DNN pages (and the dialog window needs at least to know what portal and user, etc it is being viewed under). 

Passing portalId, and all kinds of info to this page via querystring is not a good option  (security and etc, not to mention, I really do want access to the full suite of Portal and UserInfo objects).

any guru's understand the issue here?

 
New Post
9/6/2008 7:47 AM
 

The way I've managed to get this working is as follows:

1. Create the ASPX
2. Add the following imports to the .vb

Imports System.IO
Imports DotNetNuke.Entities.Tabs
Imports DotNetNuke.Security.Permissions
Imports DotNetNuke.UI.Skins
Imports DotNetNuke.UI.Utilities

3. Use the following Class signature on the .vb

Partial Class WhateveryourClassIs
    Inherits DotNetNuke.Framework.CDefault

 
New Post
9/6/2008 10:22 AM
 

Good catch Keith.

Although I have no direct experience with it, I believe that Xepient has a module that will provide similar functionality without requiring that a page's base class be modified.  Google for more information.

Brandon


Brandon Haynes
BrandonHaynes.org
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How to use Custom ASPX pagesHow to use Custom ASPX pages


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