Custom controls / Toolbox / Visual studio 2005

Discussion in 'ASP .Net Building Controls' started by Nick Stansbury, Mar 14, 2006.

  1. Hi,

    Recently upgraded to VS 2005 from 2003. Started rebuilding an asp.net app
    from scratch. Not using projects (not sure at this point whether I like or
    hate this). I've finished redeveloping all of our custom controls (see below
    for the declareation). Our custom controls are in .vb files in the App_code
    directory, along with all our other classes not in a control project or
    anything like that.

    I can't seem to find a way to add our custom controls to the toolbox. I've
    tried add/remove items, but as there isn't a DLL to navigate to, I can't add
    them that way. How do I do it?

    Also - people keep talking about user controls *automatically* being added
    into a "My User Controls" section of the toolbox. This isn't happening
    either.

    Any suggestions?

    Thanks

    Nick

    Example custom control:

    <Designer(GetType(MyNamespace.MyDesigner))> _
    Public Class ThreadedDropDownList
    Inherits WebControl
    Implements INamingContainer

    ....
    End Class
     
    Nick Stansbury, Mar 14, 2006
    #1
    1. Advertising

  2. Nick Stansbury

    ElCapitan Guest

    as to my knowledge you need to first add the object tag in the html
    body section

    <object id="simpleControl1"
    classid="WindowsControlLibrary1.dll#Microsoft.Samples.WinForms.Cs.UserControl1.UserControl1"
    height="300" width="300" VIEWASTEXT><param name="Text" value="Simple
    Control">
    </object>

    and stick the dll in the root directory (anywhere but the bin
    directory),

    now this is what i have read in hundreds of places, i just cant seem to
    make it work in vb.net only in c#, good luck and let us know if this
    works

    Eliseo
     
    ElCapitan, Mar 14, 2006
    #2
    1. Advertising

  3. Nick Stansbury

    Guest

    Your dlls should be stored in your application web root directory's bin
    directory NOT the application project directory - they should be
    different.
    E.g. c:\Inetpub\wwwroot\MyApplication\bin\MyApplication.dll
     
    , Mar 16, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?ZGF2aWQ=?=
    Replies:
    1
    Views:
    564
    =?Utf-8?B?ZGF2aWQ=?=
    Apr 12, 2005
  2. rockdale
    Replies:
    1
    Views:
    621
    Juan T. Llibre
    Aug 23, 2006
  3. Replies:
    0
    Views:
    814
  4. Nathan Sokalski
    Replies:
    2
    Views:
    1,110
    Nathan Sokalski
    Mar 22, 2010
  5. Replies:
    3
    Views:
    134
Loading...

Share This Page