Server Error in '/' Application.

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Source Error:


Line 82:         js.Attributes.Add("type", "text/javascript")
Line 83:         js.Attributes.Add("src", Page.ResolveUrl("/js/tiny_mce/tiny_mce.js"))
Line 84:         Header.Controls.Add(js)
Line 85:     End Sub
Line 86: 

Source File: C:\Webovi\mojtv.net\m2\forum\komentar.aspx.vb    Line: 84

Stack Trace:


[HttpException (0x80004005): The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).]
   System.Web.UI.ControlCollection.Add(Control child) +11660348
   m2_forum_komentar.buildHeaderStuff() in C:\Webovi\mojtv.net\m2\forum\komentar.aspx.vb:84
   m2_forum_komentar.Page_PrerenderComplete(Object sender, EventArgs e) in C:\Webovi\mojtv.net\m2\forum\komentar.aspx.vb:12
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4676.0