Building control with MS VS

L

Lubomir

MS VS 2000

Hi,

I wanted to build a user control within my project. I used the "Add new
Item" option. I expected the wizard will prepare a class inherited from
UserControl for me.

The new class was inhereted from userControl, however, it was declared as
abstract. Is there any reason why ClassWizard produces this class as
abstract? I expeceted plain base class which I can fill in with my code.

Thanks,

Lubomir
 
J

John Saunders

Lubomir said:
MS VS 2000

Hi,

I wanted to build a user control within my project. I used the "Add new
Item" option. I expected the wizard will prepare a class inherited from
UserControl for me.

The new class was inhereted from userControl, however, it was declared as
abstract. Is there any reason why ClassWizard produces this class as
abstract? I expeceted plain base class which I can fill in with my code.

It's abstract because the .ascx page derives from it.

Why is Abstract a problem for you?

John Saunders
 
L

Lubomir

John Saunders said:
It's abstract because the .ascx page derives from it.

Why is Abstract a problem for you?

John Saunders

I wanted to put some code into constructor, which was not generated. So I
was not sure if the MS VS will be not surpirse, if I write a default
constructor. And I start to think, if there was any speciall reason to
generate that class as abstract, becasue classes, generated by class wizard,
are not usually abstract.
 
J

John Saunders

Lubomir said:
I wanted to put some code into constructor, which was not generated. So I
was not sure if the MS VS will be not surpirse, if I write a default
constructor. And I start to think, if there was any speciall reason to
generate that class as abstract, becasue classes, generated by class
wizard,
are not usually abstract.

Did you try to put code into a constructor? If so, what was the result?

John Saunders
 
L

Lubomir

John Saunders said:
Did you try to put code into a constructor? If so, what was the result?

John Saunders

I suplied default constructor and it "worked". At least I didn't get a
compiler error. A control was not displayed on the asp-page. So I wonder if
it has something to to with that class or control registration. But all
directives for registration are correct (at least it seems to be so, for me
:) )
 

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
474,141
Messages
2,570,818
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top