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

HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...custom aspx pages integration with dnncustom aspx pages integration with dnn
Previous
 
Next
New Post
2/18/2012 5:42 AM
 

Hi all,I want to add new aspx pages in visual studio to dnn.Actually its simple to add as separate application or in similar app too and refer it in iframes,but it will not have dnn security.Is there any way to add new aspx pages in DNN with out losing DNN security?

Thanks in advance.

 
New Post
2/18/2012 10:58 AM
 

Hello,

I think you're looking for DotNetNuke.Framework.PageBase... In your code file, instead of inheriting the normal asp.net page class, you just inherit the DNN PageBase class and that gives you access to most things. You can evaluate permissions in there and whatnot as needed.

Mike

 
New Post
2/25/2012 8:38 AM
 

Thanks for ur reply.

As u said ,add the dotnetnuke.framework.pagebases class at the top of my new pages and i can access dnn users and other related tasks.

For example for a grid control to loss its db connection at logout i can use it as follows

'Dim userInfo = UserController.GetCurrentUserInfo()
        'If (userInfo.IsInRole("Administrators")) Then

some action on the grid
        'Else
    Some other action on the grid
        'End If

But am asking if there is away to handle this by default once the page is considered as a dotnetnuke page.i can use modules instead but when i include a page with an iframe,and then calling this page with another page then the included page displays itself with the admin content area.am happy if there is a way to handle this too.

 
New Post
2/27/2012 11:36 AM
 

Hello,

As far as I know, DNN's security basically works at the tab or module level. You have site-wide role memberships, but the UI for the framework applies these at module and tab levels.

As a developer, you can access all of that permissions info through the API - as you show in your example. But, this is done through custom code and not through the standard DNN interface.

With that said, if you're thinking of making this page, and then loading it in an iFrame, why not just make a standard module with an ascx file. This would let you take advantage of DNN's standard permissions interface.

If you want to have greater control of the design in your module, you can always use a custom skin in the module's edit controls. This is a tip I found in the code for the NB Store module.

I don't think there aren't actually that many cases where you'd want to use a full aspx file in a DNN site. They can be handy for things like a print-view or something along those lines, but beyond that, it's best to stick with the process directed by the framework.

Hope this helps,

Mike

 
Previous
 
Next
HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...custom aspx pages integration with dnncustom aspx pages integration with dnn


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