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

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Odd behavior: postback event handlers only execute in Edit modeOdd behavior: postback event handlers only execute in Edit mode
Previous
 
Next
New Post
1/30/2009 1:33 AM
 

I've been struggling with some odd behavior with my DotNetNuke module for about a day and a half now. I've tried everything I've found on Google, but nothing has worked.

I'm using DotNetNuke 04.09.00 with Visual Studio 2008 and .NET 3.5. I'm not using JavaScript--all of my event handling is done via postback, with event handlers written in C#. I've created several DotNetNuke modules and, until yesterday, they all worked as expected and continue to work as expected. Then I added a new web user control to an existing module. I used the same patterns that I've used on the previous controls, but get very different behavior: when the page containing the the new control is viewed in Edit mode everything works as expected, but in View mode, none of the C# event handlers I've written get called, not even Page_Load. Another interesting aspect of the behavior: in View mode, the controls on the new web user control have IDs like dnn_ctr384_ViewSingleStudent_ViewSingleStudent_selectStudentLabel_label and invoke __doPostBack with a first parameter like dnn$ctr384$ViewSingleStudent$ViewSingleStudent$viewStudentButton. In Edit mode, where things behave as expected, the same controls have IDs like dnn_ctr384_ViewSingleStudent_selectStudentLabel_label and dnn$ctr384$ViewSingleStudent$viewStudentButton. Working controls have IDs like the latter: the class name of the web user control appears only once.

I've copied the code of other web user controls over the contents of the new files. No change. The new control exhibits the problem described above, even though the older controls--which have the same code (except for the class name and the Inherits and CodeBehind attributes)--still work.

I've copied the files containing working controls and re-named them (as well as the class name and the Inherits and CodeBehind attributes)--same result.

I've created new web user control classes with different names and made them as trivial as I could: an <asp:Label>, an <asp:TextBox>, and an <asp:LinkButton>--same result.

Every control that I wrote before yesterday continues to work as expected, but every control I've written since yesterday afternoon has exhibited this odd behavior. Has anyone else seen this? Can anyone offer guidance? Please help--I'm at my wits' end.

Thanks in advance,
Chris

 

 
New Post
1/30/2009 6:55 AM
 

Set module caching to 0.


Do you know the truth when you hear it?
Néstor Sánchez
The Dúnadan Raptor -->Follow Me on Twitter Now!
 
New Post
1/30/2009 11:22 AM
 

I assume you mean to set the value for Default Cache Time on the Edit Module Definition page for the module that contains the control. I did that. I don't know how it got set to 60--I thought the default value was 0 (it's 0 for all of my other modules), and I know it shouldn't be anything else. I've never changed the Default Cache Time for any of my modules in the past. In fact, I completely missed the special button to update that value the first time I tried it this morning.

But that didn't fix the problem. It handles a Page_Load when first bringing up the page with the control, but nothing after that. It still works fine in Edit mode. The generated control identifiers still look wrong in View mode, but correct in Edit mode, or rather, inconsistent/consistent with control identifiers on working controls.

I put another module that I developed on the same DNN page--it works fine, even when the problematic module behaves incorrectly.

Thanks,
Chris

 
New Post
1/30/2009 1:45 PM
 

Change the caching setting for the module instance as well.


Do you know the truth when you hear it?
Néstor Sánchez
The Dúnadan Raptor -->Follow Me on Twitter Now!
 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Odd behavior: postback event handlers only execute in Edit modeOdd behavior: postback event handlers only execute in Edit 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