CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > visual_studio.visual_studio_2005 Tags:
Item Type: NewsGroup Date Entered: 7/9/2005 7:03:32 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 1 Views: 105 Favorited: 0 Favorite
2 Items, 1 Pages 1 |< << Go >> >|
aarnott
Asp.Net User
Web User Controls in class libraries7/9/2005 7:03:32 PM

0

I designed several complex user controls inside an ASP.NET web project.  Now I want to move a few of them into a reusable C# class library.  Simply moving the files over to the C# class library directory and including them in the project didn't work.  The .ascx files seem to not be recognized by Visual Studio the same way they are in a web project. 

I don't want to rewrite the majority of my controls' code so that they are web custom controls and all in the .cs file.  That would take a long time, and in my mind a web user control is much easier to work on because I can use the designer to lay out its controls rather than do everything hard-coded.

Ideally, I'd like VS to recognize and build the .ascx and .ascx.cs file together into a single class the way ASP.NET does it for a web project, so that LoadControl("*.ascx") isn't  necessary at all.  I want it to behave like a custom control on the outside, but look like a user control inside my class library project.

Can anyone advise?

I'm using VS 2005 Beta 2.

Andrew L Arnott
.NET Compact Framework
Luis Abreu
Asp.Net User
Re: Web User Controls in class libraries7/10/2005 3:59:02 PM

0

Hello.

I think that this will not be possible because libaries are compiled by using a specific language compiler isn't able to parse an aspx page. maybe you can try getting the final source code generated by your user control (look at the aspx temp folder) or maybe you could place you user controls on an empty folder and user the aspnet_compiler to get the dlls...
--
Regards,
Luis Abreu
email: labreu_at_gmail.com
PT blog: http://weblogs.pontonetpt.com/luisabreu
EN blog:http://msmvps.com/blogs/luisabreu
http://www.pontonetpt.com
http://weblogs.pontonetpt.com/
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Beginning VB.NET Authors: Richard Blair, Matthew Reynolds, Jonathan Crossland, Thearon Willis, Pages: 888, Published: 2002
Beginning ASP.NET 2.0 in VB 2005: from novice to professional Authors: Matthew MacDonald, Pages: 1063, Published: 2006
ASP.net development with macromedia Dreamweaver MX: Ryan Parnell, Joel Martinez Authors: Ryan Parnell, Joel Martinez, Pages: 310, Published: 2003
Professional ASP.NET 2.0 Authors: Bill Evjen, Scott Hanselman, Farhan Muhammad, Srinivasa Sivakumar, Devin Rader, Pages: 1253, Published: 2005
ASP.Net 2.0 MVP hacks and tips Authors: David Yack, Joe Mayo, Scott Hanselman, Fredrik Normen, Dan Wahlin, J. Ambrose Little, Jonathan Goodyear, Pages: 400, Published: 2006

Web:
Adding Web User Control To A Class Library In VS.NET 2005 I just tried your hack to add web usercontrols to a class library, it works fine , but there are a couple of things that don't work. ...
Reusing Web User Controls accross applications I am attempting to build a User control Library using your option #3. The controls will be dynamically loaded in my website through a class file in the ...
Creating custom modules and custom web User controls/ascx - Extend ... Creating custom modules and custom web User controls/ascx ... with in the solution but can't add a web user control to this class library. ...
Adding a web user control to a class library project in .Net 2.0 ... Apr 9, 2008 ... Now by default you don't get the option to add a web user control to a class library but this can be overcome by copying one from a web ...

Web User Controls in class libraries - ng.asp-net-forum ... Web User Controls in class libraries, > ROOT > NEWSGROUP > Asp.Net Forum > visual_studio.visual_studio_2005, Date: 7/9/2005 7:03:32 PM, ...
Dynamically load user control from control library - ng.asp-net ... I have created several web user controls within a Web Control Library project ... Web User Controls in class libraries - ng.asp-net-forum . ...
Class Libraries: How to reference - ng.asp-net-forum ... Now, after the conversion none of my class libraries are recognized by VWD ..... Web User Controls in class libraries - ng.asp-net-forum . ...
Subtext - A project with an Output Type of Class Library cannot be ... Adding Web User Control To A Class Library In VS.NET 2005 If you've started on module development with DotNetNuke 4.0 and above in Visual ...

Videos:
Getting Started with the Google Data PHP Client Library Trevor Johns goes over how to get started with the Google Data PHP Client - from installation to general architecture to brief demo with the ...
Own Your Blog or Else! Easy WordPress Install Watch this video tutorial and see how simple it is to get online with a blog today! Create a blog using free software from wordpress.org and ...
Web Applications and the Ubiquitous Web Google TechTalks February 1, 2006 Dave Raggett Dave Raggett is currently a W3C Fellow from Canon, and W3C Activity Lead for Multimodal ...
GTUG - Using the Google Collections Library for Java (1 of 2) 08/06/2008 - http://sv-gtug.org The Java Collections Framework is indispensable to nearly every Java developer. Yet, you may often find ...
Computers versus Common Sense Google TechTalks May 30, 2006 Douglas Lenat Dr. Douglas Lenat is the President and CEO of Cycorp. Since 1984, he and his team have been ...






wap production date?

visual studio .net

run dos command from within vs 2005 or run a dts package

is there a way of publishing just the app_code dll?

adding the images to this box?

problems with designer

recent project list (projectmrulist) no longer works

local dev webserver --- dont want virtual directory

web application projects - problems with page.title

date data type sql database

how to configure vs2005 to debug using iis 6

reference one projetc in another project

how to install microsoft silverlight????

macro ide is not available in tools menu

datasource object is not display in webform after drag and drop

vs2005 - remove all comments from source code

multiple solution copies to one machine virtual directory issue!

vs 2005 with .net 3.0

questions regarding debugging in vs2005

accessibility in asp.net / vs whidbey

delete of codefile, re-adding codefile - 'context is not a member of xxx.'

updating a cookie c#

keep tab indents in vs 2005

accessibility checker on asp.1.1

passing a parameter into a stored procedure in a report ..........

specifying what browser to use when running website projects?

vs 2005 rtm is now avaliable for download for msdn subscribers

code analysis and best practices

xsd to vb

standard control toolbox disable in webform

   
  Privacy | Contact Us
All Times Are GMT