ASP.NET 2 and custom controls!! How can i create them?

Discussion in 'ASP .Net Building Controls' started by smash2004@gmail.com, Oct 30, 2005.

  1. Guest

    i can't find anything on the net to create a simple custom control with
    asp.net 2 and use it in other project..with that i mean having my own
    custom control on toolbox to drag it in designtime

    in asp.net 1 that was simple...i just built my project and there was
    dll which i importet in my tab in toolbox...but in asp.net 2 there are
    is no dll generated when i build my project so i can't import
    anything...

    are there any good tutorials on this, but it has to be ASP.NET 2!!!

    or maybe someone can explain me this with a very simple example...

    thx in advance
     
    , Oct 30, 2005
    #1
    1. Advertising

  2. Riki Guest

    wrote:
    > i can't find anything on the net to create a simple custom control
    > with asp.net 2 and use it in other project..with that i mean having
    > my own custom control on toolbox to drag it in designtime
    >
    > in asp.net 1 that was simple...i just built my project and there was
    > dll which i importet in my tab in toolbox...but in asp.net 2 there are
    > is no dll generated when i build my project so i can't import
    > anything...
    >
    > are there any good tutorials on this, but it has to be ASP.NET 2!!!
    >
    > or maybe someone can explain me this with a very simple example...
    >
    > thx in advance


    I guess you're using Visual Web Developer 2005 Express?
    In that case, you can't create custom controls with it. You need
    Visual Studio 2005. You could also compile your files manually
    into a dll with csc or vbc.

    Create a batch file "build.bat", with content like this:

    SET source=myfile1.vb myfile2.vb
    SET target=bin\mydll.dll
    SET
    assemblies=system.web.dll,system.dll,system.xml.dll,system.design.dll,system.drawing.dll
    SET compiler=%WINDIR%/Microsoft.NET/Framework/v2.0.50215
    SET res1=.\mybitmap.bmp,mynamespace.mybitmap.bmp
    SET res2=.\myresource.resx
    %compiler%\vbc /t:library /out:%target% /r:%assemblies% %source% /res:%res1%
    /res:%res2% /nowarn
    pause

    Replace vbc with csc if you use C#, and replace 2.0.50215 with the correct
    version number.

    --

    Riki
     
    Riki, Oct 31, 2005
    #2
    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. Crosta
    Replies:
    2
    Views:
    332
    Crosta
    Jul 2, 2004
  2. Anonieko

    HttpHandlers - Learn Them. Use Them.

    Anonieko, Jun 15, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    538
    tdavisjr
    Jun 16, 2006
  3. rodchar
    Replies:
    0
    Views:
    399
    rodchar
    Nov 26, 2007
  4. rifat yavuz
    Replies:
    0
    Views:
    222
    rifat yavuz
    Jul 4, 2008
  5. why the lucky stiff
    Replies:
    5
    Views:
    153
    why the lucky stiff
    Sep 22, 2004
Loading...

Share This Page