Bug reports Found a bug? Post it here please.
Version 4.x > Bug reports > creating aspx tamplate- missing "using CMS.UIControls;" View modes: 
User avatar
Member
Member
eagleag-yahoo - 2/8/2009 5:56:11 AM
   
creating aspx tamplate- missing "using CMS.UIControls;"
Hi I followed the devguide
Development with ASPX page templates -> Creating a new ASPX page template

when i was done i got an error in cmsdesk -> page.

solved it after adding "using CMS.UIControls;" to template code behind.


cheers :)





User avatar
Member
Member
gary.novak-mhcc - 2/19/2009 3:46:07 PM
   
RE:creating aspx tamplate- missing "using CMS.UIControls;"
Just to be clear about it all. This is what MyMaster.master.vb should look like in a VB-based system:

Imports CMS.UIControls

Partial Class CMSTemplates_MySite_MyMaster
Inherits TemplateMasterPage

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
CreateChildControls()
OnPreRender(e)
End Sub
Protected Overloads Overrides Sub CreateChildControls()
MyBase.CreateChildControls()

Me.PageManager = Me.CMSPageManager1
End Sub
Protected Overloads Overrides Sub OnPreRender(ByVal e As EventArgs)
MyBase.OnPreRender(e)

Me.ltlTags.Text = Me.HeaderTags
End Sub

End Class

The first line, Imports CMS.UIControls, is missing from the documentation.

You also need the declaration in Home.aspx.vb:

Imports CMS.UIControls

Partial Class CMSTemplates_MySite_Home
Inherits TemplatePage

End Class

The documentation needs to be fixed, in this respect.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/23/2009 6:48:45 AM
   
RE:creating aspx tamplate- missing "using CMS.UIControls;"
Hi,

I am sorry for this inconvenience. We are already aware of this mistake and it will be fixed in the new documentation.

Best Regards,
Juraj Ondrus