Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
The best choice for your web site host, email hosting, and domain registration.
 


  Sponsors  

Meet Our Sponsors

Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
ExactTarget email software solutions
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  ClientAPI Compo...  RegisterPostBackEventHandler works on DNN4.5.3 BUT NOT Work on 4.8.0
Previous Previous
 
Next Next
New Post 4/21/2008 5:34 PM
Unresolved
User is offline hz_yang
11 posts
12
10th Ranked


RegisterPostBackEventHandler works on DNN4.5.3 BUT NOT Work on 4.8.0 

Hi, Jon and everybody:

    I work on a module which using ClientAPI and call RegisterPostBackEventHandler on Page_Init method like this:

        Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
                ClientAPI.RegisterPostBackEventHandler(Page, "ClientSave", AddressOf ClientSaveDataCallBack, False)
        End Sub

    It works perfect on DNN 4.5.3 and does not work on 4.8.0. so in 4.8.0, I'm reading Jon's document and do the follow steps to enable RegisterPostBackEventHandler

 

    1. Add <input id="__dnnVariable" type="hidden" name="__dnnVariable" runat="server"> on .ascx files, doesn't work

    2.use the Hack method which Joe suggest on the PDF document which modify onParentOnLoad (and using RegisterPostBackEventHandler on OnParentOnLoad)

    3.using ClientAPI.RegisterClientVariable(Page, "__dnnVariable", "", True) method on Page_Load to register __dnnVariable

 

and as the same, it doesn't work and it says:

Error: Edit Redstartform is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases. ---> System.Web.HttpException: The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases. at System.Web.UI.ControlCollection.Add(Control child) at DotNetNuke.UI.Utilities.ClientAPI.RegisterPostBackEventHandler(Control objParent, String strEventName, PostBackEvent objDelegate, Boolean blnMultipleHandlers) at Confidence.Modules.Redstartform.EditRedstartform.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---


    but it work perfect on DNN4.5.3. so what should I do? back to version 4.5.3?

 

    thanks everybody

 
New Post 4/23/2008 6:32 PM
User is offline hz_yang
11 posts
12
10th Ranked


Re: RegisterPostBackEventHandler works on DNN4.5.3 BUT NOT Work on 4.8.0 

Can Joe or anybody help? I will have to lower my DNN version to 4.5.3 if cannot handle this...

 
New Post 4/24/2008 11:24 AM
User is offline Jon Henning
1581 posts
www.codeendeavors.com
5th Ranked










Re: RegisterPostBackEventHandler works on DNN4.5.3 BUT NOT Work on 4.8.0 

I don't really know why you would be getting this error.  The only time the ClientAPI attempts to add a control to the collection is when the hidden control it needs to pass state back and forth doesn't already exist on the page.  Could you open up your site's default.aspx file and verify that the following line exists?

<input id="__dnnVariable" runat="server" name="__dnnVariable" type="hidden" />

 


 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  ClientAPI Compo...  RegisterPostBackEventHandler works on DNN4.5.3 BUT NOT Work on 4.8.0
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


ASP.NET Web Hosting for $3.95
3 Month FREE ASP.NET Hosting! FREE Setup! DNN Support! FREE Domain Name! FREE Components! Host multiple websites on 1 plan! 30 Days Money Back Guarantee!
www.dailyrazor.com
Cestus Websites
DotNetNuke websites en services in Nederland. Cestus Websites levert websites, projectmanagent, skins, modules, training en gespecialiseerde hosting op basis van het CMS DotNetNuke.
www.dotnetnuke-websites.nl
FREE Skins, Modules & Control Panel!
Choose how much you want to pay on our Skins, Modules, Containers and Control Panel - Starting from FREE!
www.dnngroup.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP