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.0Help:Load User Controls Dynamically into Custom ModulesHelp:Load User Controls Dynamically into Custom Modules
Previous
 
Next
New Post
3/4/2006 10:26 AM
 
Hi,
I developed a custom dnn module with a asp panel control. I am adding another user control[Let's say 'B'] into the Panel control dynamically in the "Edit" control [let's say 'A']. Everything works fine when I login as host. When I login as a Registered user, the Postback action from control 'B' is causing the user to logout and is redirecting the user to the login page. Upon further investigation, I found that in admin\containeractionbutton.ascx.vb, the method UserController.GetCurrentUserInfo is returning blank UserInfo and objActionBase collection is empty.
Please let me know if I am not clear.. Help is greatly appreciated.
Prakash
 
New Post
3/4/2006 6:46 PM
 
Hi,

While I must admit, I can't follow your description all the way, I'll give it a shot anyway.

Could it be that your dynamicly added controls don't exist after postback? You should recreate them after postback (preferably in Page_Init, because of Viewstate parsing) to be able to use them in code.


Web applications, DNN websites, modules, skins and support
 
New Post
3/5/2006 2:46 PM
 

Thanks 'super' for the reply. I developed a custom DNN module for version 4.0.2. Instead of developing multiple modules for all my tasks, I thought of developing only 1 module and load other User controls into these modules. [The custom DNN module basically acts like a Placeholder for other user controls. Similar to the "SmartDNNModule" on snowcovered].  This setup works great if i Login as "Host" but if I login as a regular user, [for ex: subscriber], when I go to the "edit"  control, it just logs you off.

 

 
New Post
3/5/2006 2:50 PM
 
Also, when I login as a regular user, it just logs me off automatically when i got the "Edit" control.
 
New Post
3/5/2006 3:46 PM
 
Now i see. Could it be your other controls have the type "Edit" in moduledefinitions? In that case it makes sense that DNN wants the user to login with admin rights.
If that's the case: set them to type "View" and see what happens...


Web applications, DNN websites, modules, skins and support
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Help:Load User Controls Dynamically into Custom ModulesHelp:Load User Controls Dynamically into Custom Modules


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