Samuel Haddad

  • About Me

Recent Post

  • Git Delete all local branches except main
  • Android – Set the Background Color Notification Notification
  • Fix ‘Another Update is Currently in Progress’ WordPress Error
  • Allow Console Logging with ESLint
  • Nuget File Locations

Categories

  • .NET
  • Android
  • ASP.NET
  • Development
  • GIT
  • Mobile
  • OsCommerce
  • Personal Projects
  • PHP
  • SharePoint
  • Software
  • SQL
  • SSIS
  • Tech Support
  • Uncategorized
  • Web
  • Wordpress

About Me

  • LinkedIn
  • My GitHub

Tag: Script

ASP.NET system.InvalidOperationException: Script controls may not be registered before PreRender.

September 12, 2014 by Samuel Haddad·0 Comments

Today I ran into the following error.

System.InvalidOperationException: Script controls may not be registered before PreRender.

In my case I was overriding OnPreRender and forgot to include base.OnPreRender(e)

  protected override void OnPreRender(EventArgs e) {
      base.OnPreRender(e); //Don't forget me.
    }

Adding in the the call to base solved the issue.

Proudly powered by WordPress. Theme: Flat 1.7.11 by Themeisle.