Last post Aug 06, 2013 01:16 AM by charles922
Jun 09, 2011 09:57 AM|eppack|LINK
Error is in Sample\DefaultMaster.master.cs:
The type or namespace name 'IContentPlaceHolders' could not be found (are you missing a using directive or an assembly reference?)
I'm still new (and shaky :) enough to VS 2005, and haven't really done anything with a master page yet, to not be sure what I'm missing here. I had d/l the Toolkit and all the samples, have it showing in my folders in VS, the toolbox, etc etc, but the samples
won't build just for this one last error.
I'm ass-u-ing it's a reference of some kind, a using tag, whatever, but sorry, not sure where it would go :(
Jun 09, 2011 10:14 AM|bouwob2|LINK
Do you have these 2 references added?
Jun 09, 2011 10:34 AM|eppack|LINK
Yep, both came in with the samples.
Jun 09, 2011 01:38 PM|bouwob2|LINK
Do you have the ajax toolkit added as a reference to the project?
Jun 09, 2011 01:59 PM|eppack|LINK
Is that added via the Add Reference on the right click of the project name? Same as adding "regular" projects? If so, is it a .Net or Com? Obviously not a project :) Don't see any references to "AjaxToolkit" in either one.
I had tried that tho, rightly or wrongly, going to the browse tab, since it wasn't in either of the first two. Saw the two ajax toolkit dlls which are in my project (it was created as a website per the instructions, if that makes a difference) and clicked
on them, but nothing happens. Made sense to me they should be referenced, but since they didn't appear to be added in that dialog box, figgered there was a different way to do that. Updating the reference (seen when r/c on the dll) didn't change anything either.
Jun 09, 2011 11:25 PM|chetan.sarode|LINK
Hi, Please refer this
Jun 10, 2011 09:27 AM|eppack|LINK
Thanks, Chetan, I did see that article before, but while I understand it's case sensitive, this is a sample app that came in as-is, and I suspect the problem is more that it's missing a reference, and I simply don't know which one it is looking for nor where
to put it :(
My big problem is that as something of a newbie still, the syntax can be killing.
After poking around a bit more, I found "property pages" which has a references item, and it does show the toolkit files there. I don't see it under the "regular" references tho, but that may be correct, dunno.
Jun 10, 2011 11:27 AM|eppack|LINK
OK, I completely killed the original AjaxToolkit sample website I made, and recreated it as an Ajax-enabled website, an option I'm not 100% sure I had before. The ajaxtoolkit box is in my toolbox, and I added all the files from the sample site zip file to
the new website. I tried to build it, as is, and it throws this error (multiple times):
Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. The system cannot find the file specified.
C:\Documents and Settings\epack\My Documents\Visual Studio 2005\WebSites\AJAXEnabledWebSite1\AnotherStyle.aspx 2
Now what's interesting here is that this website in my VS doesn't have a bin folder, although as I usually do my stuff as (web-based) projects, it gets created in those automatically. That didn't happen here, but maybe that's OK, dunno. Either way, all 3 of
the ajaxtoolkit dll files are in the "project". As a test, I manually created a bin folder, and moved all 3 toolkit files (.dll and .pdb) to the bin folder and rebuilt it. Interestingly (to me at least :) it worked, the not found errors did go away. However,
now I see a couple more errors in some of the sub files, mainly "unknown server tags", even tho the assemblies and tag prefixes are registered in the .aspx files:
Several of the samples also throw this error (with different values, tho, after customeditors:):
Element 'FullWithRightBottom' is not a known element. This can occur if there is a compilation error in the Web site.
C:\Documents and Settings\epack\My Documents\Visual Studio 2005\WebSites\AJAXEnabledWebSite1\AnotherStyle.aspx
on this code:
And now I do NOT get that error I had on the defaultmaster file earlier, interestingly too.
I guess part of my confusion is that I'd assumed the sample site would be more "shovel ready" than it appears to be, other than idiosyncrasies in individual servers, of course. And as we are more VB skilled here (me aside :) there could be something in the
C code that I'm missing somewhere, dunno, although I don't think I named anything incorrectly case-wise, and hopefully the sample code is properly formed. I did get errors on it saying it didn't like code in the body tag, which is fine, so I removed all of
that, leaving the base tag.
Nothing is easy :(
Dec 07, 2011 06:07 PM|padawan_i|LINK
If this has been resolved for you great, if not I have a solution for ya. I ran into the same issue while loading the AjaxControlToolkitSampleSite into Visual Studio. I attempted to create the project as a “Web Application” verses a “Web Site”. Each compile
differently so as a Web Application it through a ton of errors. However, as a Web Site it built the first time without any modifications!!!
Recreate it as a Web Site, should work.
Aug 05, 2013 10:36 PM|charles922|LINK
On Windows 7, .Net 4.0, I used Visual Studio 2010 and created both "Web Application" and "Web Site" but got the same error as Elaine: "type or namespace name 'IContentPlaceHolders' could not be found".
I tried several times, deleting and re-creating projects, added AjaxControlToolkit.dll to the project, copied Defaul*.*, *.config, and CommonPage.cs from the AjaxControlToolkitSampleSite code to my project. Unfortunately I was not able to resolve the 'IContentPlaceHolders'
It would be very helpful if someone could post the VS solution file (.sln) since we "newbies" tend to create the VS project, then more or less blindly copy files from the AjaxControlToolkitSampleSite code to the project, not knowing which ones are needed,
and which are not.
Thanks in advance.
Aug 06, 2013 01:16 AM|charles922|LINK
I finally managed to create a project that builds and runs. It's almost 12MB, but I can try to provide a copy to anyone who is having the same problem.
Some of the issues include:
Theme="SampleSiteTheme" had to be removed from *.aspx
AjaxFileUpload.aspx.cs simply would not compile
I'm sure there are other issues as I have not yet tried all the Example subdirectories. It would be nice if an ASP.NET Ajax Control Toolkit expert could rework the AjaxControlToolkitSampleSite code so it all builds and runs.