Element 'CslaDataSource' is not a known element

Element 'CslaDataSource' is not a known element

Old forum URL: forums.lhotka.net/forums/t/963.aspx


MadGerbil posted on Monday, August 21, 2006

I've added the csla.dll to my toolbox and I got the handy little CslaDataSource tool.  I dropped the control onto my form and in the source code it puts a squiggly under it and says the Element 'CslaDataSource' is not a known element.    I don't know why this would be - any clues?  (Using 2.0.3)

When I go to the code portion of the page I can use [csladatasourcename].SelectObject without getting any errors so obviously the csladatasource element is being recognized in the code behind page.

It's bizzare because if I click on the datasource control in the designer the property window has the properties available for it: TypeAssemblyName and TypeName.  I can build the solution and view it in the ASP web server environment with no errors.

MadGerbil replied on Monday, August 21, 2006

Now I'm wondering if it is because I'm running in the ASP virtual web server instead of IIS.  I've no use for the CSLA security objects so I thought I'd be okay in the virtual environment.  Does that sound plausible?

RockfordLhotka replied on Monday, August 21, 2006

That shouldn't matter - you should be able to run in either environment.

However, the intellisense in the html/xml editors of VS drive off a set of schema files. My guess is that any custom controls would have this issue, because obviously those tags don't exist in the schema files and so wouldn't be recognized as "valid" elements.

MadGerbil replied on Monday, August 21, 2006

The CSLA datasource shows up in the tool box - when I drag and drop it onto my form the CSLA.dll is added to the web sites bin directory.  The error message says the following:

Error 1 Element 'CslaDataSource' is not a known element. This can occur if there is a compilation error in the Web site. 

The silly thing compiles.  Does anyone else have this issue?


MadGerbil replied on Tuesday, August 22, 2006

Okay, I've got this working now.   I apologize for the nOOb question, but I'm having to get back into ASP and learn the framework all at the same time.   I didn't have my text box wrapped in a asp:FormView tag so it wasn't accessing the object like it should.  It WORKS and I'm thrilled.

 

=)

Copyright (c) Marimer LLC