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

S

smash2004

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
 
R

Riki

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top