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.0Content gone in View ModeContent gone in View Mode
Previous
 
Next
New Post
12/30/2008 6:08 PM
 

I am working at writing my own module and having an issue when in view mode.

 

In the Page_Load event handler I am using RegisterClientScriptBlock and RegisterStartupScript. While in edit mode these work fine and the code is on the page when I view the source, but when I switch to view mode this code is not on the page when I view the source. The code is getting hit in both cases when I step through the code.

 

Any thoughts?

 

 
New Post
12/30/2008 11:05 PM
 

Undedr closer observation the only time my Page_Load event handler is being called is during the Edit mode and not the View mode.

Content on the control is showing but the Page_Load event handler is not being called.

Does anyone know what might be causeing this to happen?

 
New Post
12/31/2008 10:01 AM
 

Looks like a variation of the common problem of moodule caching interferring with postbacks.

Try setting the Cache Time to 0 in the module settings.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
12/31/2008 10:16 AM
 

  1. I have DNN 4.09 installed and up and running on localhost.
  2. I am using Visual Web Developer 2008.
  3. I add New Item to the solution.
  4. I select C# DotNetNuke Dynamic Module.
  5. I update the folder names as directed and modified the web.config file as directed.
  6. I login to the site as host.
  7. I go to Install Additional Modules.
  8. I select Import Module Definition.
  9. I select the newly created Manifest.
  10. I click on Import Manifest.
  11. It is in my list of Installed Modules.
  12. I then go to Host > SQL.
  13. I run the generated SQL script.
  14. I go to the home page and add an instance of the new module and it shows as expected.
  15. I edit the code behind Page_Load event handler. At the top of the event handler I insert the following code:

    string script = "<script type=\"text/javascript\" id=\"TestScript\"> \"TestScript\");</script>";
    Page.ClientScript.RegisterStartupScript(this.GetType(), "TestScript", script);

  16. Build and Run the website. – No alert message.
  17. Login as host in Edit mode – Alert message.
  18. Click on View mode – No alert message.
  19. Go back to Edit mode – Alert message.
  20. Repeat steps 18 and 19 in complete confusion several times.
  21. Click Edit mode – Alert message – View source – script is there.
  22. Click View mode – No alert message – View Source – script is not there.

 

Help! What is wrong? Is there some setting somewhere I am not doing?

 
New Post
12/31/2008 11:26 AM
 

Thank you for your response William.

This worked!

However there was more to it then just setting the cache time. I also had to remove any instance of the module that was added with the longer cache time and create an new instance of module under the 0 cache time.

The steps above place the default cache time to 60. I suggest that anyone following the steps above insert:
5.5. Modify the cache time of the .dnn file from 60 to 0.

Thanks again William.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Content gone in View ModeContent gone in View Mode


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