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  
r2i.ntegrated
 


  Sponsors  

Meet Our Sponsors

SmarterTools
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
 


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
1574 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.

 


AfterImage Internet Consulting and SEO Services
AfterImage provides search engine optimization (SEO), Internet consulting and hosting services for the Windows platform (IIS, ASP, SQL Server).
www.afterimage.nl/
Willhite & Sharron Realtors
Exemplary service for your Seattle Real Estate needs. It's what you deserve from your Realtor®!
www.alkihomes.com
Swanzey Internet Group LLC
DotNetNuke design, development, hosting, maintenance, and training. Translation of conventional (non-DNN) sites welcomed. Cleanup of existing DNN sites welcomed.
www.swanzey.com

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