Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using Custom control in the page
Message
De
29/02/2008 19:33:45
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Conception classe
Versions des environnements
OS:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01296539
Message ID:
01297927
Vues:
15
I don't know what the UCD folder is. OK, so it's in the same solution, but that doesn't tell me much. Are you using Web Application Projects? If so, then you need a reference to whichever project this UCD thingie is in. If you're not using Web Application Projects, then I can't help you at all because I have no clue how to do anything without a project. As I mentioned in another thread, the lack of Web Application Projects in VS2005 was something "new" that Microsoft thought was a good idea. It wasn't, so they put the projects back in with SP1 (and I assume that VS2008 still has them) ... I only have experience with Web Services using Web projects.

~~Bonnie



>Hi Bonnie,
>
>Here comes my confusion - I have the ascx file with the class defined in the UCD folder in the same solution. I'm not sure if the classes for the solution are compiled into a different dll and if they are, to which one. So, what using statement or reference should I add?
>
>BTW, if I close particular page and then chose rebuild all option, everything compiles all right. But often when I open a page I got lots of errors and warnings...
>
>>Naomi,
>>
>>It's just what the error message says ... you're missing either a "using ..." statement at the top of your code or a reference to the project or DLL where that class lives (references being stuff that gets added to the project in your Solution Explorer).
>>
>>~~Bonnie
>>
>>
>>
>>>Hi everybody,
>>>
>>>I have a page that tries to instantiate a custom button class using the following code:
>>>
>>> UCD_volunteerBtn Vol;
>>>                        Vol = (UCD_volunteerBtn)Page.LoadControl("/UCD/volunteerBtn.ascx");
>>>                        Vol.PersonID = (int)P.PersonID;
>>>                        Vol.IsEvent = false;
>>>                        Vol.Program = Prog;
>>>                        Vol.PSession = PrgSesssion;
>>>                        Vol.CssClass = "nav" + Theme.CSSPrefixClass;
>>>
>>>It gives me this error:
>>>
>>>Error 1 The type or namespace name 'UCD_volunteerBtn' could not be found (are you missing a using directive or an assembly reference?) C:\Development\Visual Studio 2005\WebSites\FCFront\UCD\EventProgramMod.ascx.cs 105
>>>
>>>I found the class for this button, but I'm not sure what should I do.
>>>
>>>Thanks a lot in advance.
>>>
>>>Also why when I build the solution, it succeed, but when I re-build it gives me the above and bunch of other related errors?
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform