Thursday, March 22, 2012

VisualWebPart error +--- is not allowed here because it does not extend class 'System.Web.UI.UserControl'."}

{"'TestWebPart.Test.TestUserControl' is not allowed here because it does not extend class 'System.Web.UI.UserControl'."}

I got this error when I copy pasted some code from another file and pasted on to an existing web part file.

The reason was that the namespaces were out of sync. Once I fixed that it worked fine ;)

Silly mistake but could take some time to realise
Cheers!

No comments: