Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AspDotNetStoreFront
  Ads  
 


  Sponsors  

Meet Our Sponsors

Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
OnyakTech
CrystalTech Web Hosting™
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  how to add a WebUserControl in class library:
Previous Previous
 
Next Next
New Post 5/28/2008 12:32 AM
User is offline soona
43 posts
10th Ranked


how to add a WebUserControl in class library: 

hi,

This is my question:   How to add a WebUserControl.ascx control in Class library?

actually, i finished one Module, i need to convert a DLL , In Class Library (C#)  webusercontrols s  not available .

so, pls tell some idea.

Kind regards..

soona

thank u

 
New Post 5/30/2008 12:17 PM
User is offline Golden Snitch
32 posts
10th Ranked


Re: how to add a WebUserControl in class library: 

As far as I know this can't be done, at least not all the way.  The only way to include an ASP.NET control in a class library is to convert your User Control to a Server Control which is a lot work (but usualy possible), especially if you are also learning Server Control development at the same time.  DNN has several server controls that they use, see the WebControls project code and the code for the User Properties controls in the Controls\PropertyEditor\Edit Controls foler of the Library project for some good examples.

The most you can do is move your code behind into a class library which is the approach that DNN takes for a lot of stuff.  The code behind for all the controls in the "controls" folder of the web site (labelcontrol.ascx, urlcontrol.ascx, etc) is in the Library project in the "controls" folder (along with a lot of other stuff as well).  The Library project assembly ends up in the web site's bin folder via the build process so when ASP.NET goes looking for the code behind class it finds it in that class library.  In other ASP.NET projects you can also do some tricks with pre-compiling the web site where you end up with all the ASCX "code" in an assembly but DNN does not support pre-compiling so those options are not available.

 
New Post 5/30/2008 12:50 PM
User is offline Steve Fabian
1510 posts
5th Ranked








Re: how to add a WebUserControl in class library: 

I'm not sure I understand what you're asking, can you provide some more information about your module and "why" you think you need to add a web control in a class library? A class library is purely code it is not a control.  Maybe it's just a problem with your english .. do you want your class library to "create" a web control, then you module would be able to call the class library to create the control and then have the control injected into your module?

Anyway, it's not really clear what it is you are trying to accomplish.  If you can somehow explain it a little more, maybe we can help you or maybe we can suggest an alternate approach to solving your problem.


Steve Fabian
Gooddogs.com
Sit, Stay, Code ... Good boy!
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  how to add a WebUserControl in class library:
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Adaptive InfoSystems, Inc.
We provide custom programming and various levels of support for DotNetNuke and the .Net framework.
www.aisysweb.com
Multipartner Virtual Data Rooms
The Virtual Data Rooms (VDR) provided by an expert advisor, far from any ordinary software company!, supporting the sellers and their consultants. Multipartner builds and services higly professional Virtual Data Rooms (VDR) specifically tailored to M&A, Real Estate and NPL deals.
www.multipartner.com
DNN SEO
Seablick Consulting specializes in DNN search engine optimization (SEO), DNN consulting, as well as support & training.
seablick.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP