[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Vikas Manghani

10/14/2007 4:28:00 PM

Hi
I have a base user control that is inherited from System.Web.UI.UserControl.
It has a single button on it. I want to derive few other controls from this
base user control.
I am using Visual Studio 2005 (ASP.Net 2.0). But its not as simple as
setting the right base classes for the code behind class and setting the
Inherits attribute in the aspx page.
If I create the usercontrol as a class in App_Code and inherit my classes
from it, it works. The problem is that if the class is in App_Code I cannot
have a UI to it, i.e. have a button on its surface.
Can anyone tell me how do I do it?

Thanks in advance
Vikas Manghani

5 Answers

Nathan Sokalski

1/8/2008 3:24:00 AM

0

You normally do not inherit a UserControl, because the code that adds the
controls in the *.ascx file is done using a Template in the UserControl
class. Something that you can do, however, is the following:

Create another UserControl and use your original UserControl in it
declaratively just like you would a Label or Image or other control that is
built into ASP.NET. If there is code in the codebehind that you want to use
in both UserControls, place that code in a separate.

If you want to include the UserControl in a CustomControl, simply add it
dynamically the same way you would for one of the controls built into
ASP.NET. For example:

Dim myctrl As New MyCtrl()

And then assign values to any of the properties. Hopefully this will help
you with your problem.
--
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansok...

"Vikas Manghani" <VikasManghani@discussions.microsoft.com> wrote in message
news:C74FFD61-C4DF-4435-B3A5-43FB3D73EDB6@microsoft.com...
> Hi
> I have a base user control that is inherited from
> System.Web.UI.UserControl.
> It has a single button on it. I want to derive few other controls from
> this
> base user control.
> I am using Visual Studio 2005 (ASP.Net 2.0). But its not as simple as
> setting the right base classes for the code behind class and setting the
> Inherits attribute in the aspx page.
> If I create the usercontrol as a class in App_Code and inherit my classes
> from it, it works. The problem is that if the class is in App_Code I
> cannot
> have a UI to it, i.e. have a button on its surface.
> Can anyone tell me how do I do it?
>
> Thanks in advance
> Vikas Manghani
>


hy_biscus

7/4/2010 4:48:00 AM

0

Lady Azure, Baroness of the North Pole wrote:
>
> Aine wrote:
>
>> On Jul 3, 5:37 am, hy <"(hy)hy_biscus"@hotmail.com> wrote:
>>> Aine wrote:
>>>> On Jul 3, 3:44 am, ren <ren1...@hotmail.com> wrote:
>>>>> It isn't ethical for a doctor to treat someone who refuses treatment.
>>>>> But it is ethical for a doctor to convince someone to get treatment.
>>>>> So, you, if you really want to perform a healing on someone, must
>>>>> convince them to let you help them. If they still refuse, I would say
>>>>> that it is unethical for you to perform that spell for them.
>>>>> It isn't unethical to say that you will pray for them considering that
>>>>> some think that spell work with their deities is a form of prayer.
>>>> No means no. Spell, prayer or otherwise. Amazing how arrogant you or
>>>> anyone else is to "believe" you know what is best for people. your
>>>> healing is based on your perception of what is illness or what needs
>>>> fixed. Usually by people who are messed up in the head or their own
>>>> lives they cannot even fix. Ya, you and Hy. Always thinking you know
>>>> best what needs to be fixed in others. No means no. You are both
>>>> unethical.
>>> You are so negative, you have become invisible.<
>> You do not even see your stupidity here.
>
> Willfully "Blind"!
>


Yes.

Lady Azure, Baroness of the North Pole

7/6/2010 4:13:00 AM

0



hy wrote:

> Lady Azure, Baroness of the North Pole wrote:
> >
> > Aine wrote:
> >
> >> On Jul 3, 5:37 am, hy <"(hy)hy_biscus"@hotmail.com> wrote:
> >>> Aine wrote:
> >>>> On Jul 3, 3:44 am, ren <ren1...@hotmail.com> wrote:
> >>>>> It isn't ethical for a doctor to treat someone who refuses treatment.
> >>>>> But it is ethical for a doctor to convince someone to get treatment.
> >>>>> So, you, if you really want to perform a healing on someone, must
> >>>>> convince them to let you help them. If they still refuse, I would say
> >>>>> that it is unethical for you to perform that spell for them.
> >>>>> It isn't unethical to say that you will pray for them considering that
> >>>>> some think that spell work with their deities is a form of prayer.
> >>>> No means no. Spell, prayer or otherwise. Amazing how arrogant you or
> >>>> anyone else is to "believe" you know what is best for people. your
> >>>> healing is based on your perception of what is illness or what needs
> >>>> fixed. Usually by people who are messed up in the head or their own
> >>>> lives they cannot even fix. Ya, you and Hy. Always thinking you know
> >>>> best what needs to be fixed in others. No means no. You are both
> >>>> unethical.
> >>> You are so negative, you have become invisible.<
> >> You do not even see your stupidity here.
> >
> > Willfully "Blind"!
> >
>
> Yes.

At least you admit turning a Blind Eye to others ways!

hy_biscus

7/6/2010 4:54:00 AM

0

Lady Azure, Baroness of the North Pole wrote:
>
> hy wrote:
>
>> Lady Azure, Baroness of the North Pole wrote:
>>> Aine wrote:
>>>
>>>> On Jul 3, 5:37 am, hy <"(hy)hy_biscus"@hotmail.com> wrote:
>>>>> Aine wrote:
>>>>>> On Jul 3, 3:44 am, ren <ren1...@hotmail.com> wrote:
>>>>>>> It isn't ethical for a doctor to treat someone who refuses treatment.
>>>>>>> But it is ethical for a doctor to convince someone to get treatment.
>>>>>>> So, you, if you really want to perform a healing on someone, must
>>>>>>> convince them to let you help them. If they still refuse, I would say
>>>>>>> that it is unethical for you to perform that spell for them.
>>>>>>> It isn't unethical to say that you will pray for them considering that
>>>>>>> some think that spell work with their deities is a form of prayer.
>>>>>> No means no. Spell, prayer or otherwise. Amazing how arrogant you or
>>>>>> anyone else is to "believe" you know what is best for people. your
>>>>>> healing is based on your perception of what is illness or what needs
>>>>>> fixed. Usually by people who are messed up in the head or their own
>>>>>> lives they cannot even fix. Ya, you and Hy. Always thinking you know
>>>>>> best what needs to be fixed in others. No means no. You are both
>>>>>> unethical.
>>>>> You are so negative, you have become invisible.<
>>>> You do not even see your stupidity here.
>>> Willfully "Blind"!
>>>
>> Yes.
>
> At least you admit turning a Blind Eye to others ways!

Well, would you suggest something else?

Lady Azure, Baroness of the North Pole

7/7/2010 4:00:00 AM

0



hy wrote:

> Lady Azure, Baroness of the North Pole wrote:
> >
> > hy wrote:
> >
> >> Lady Azure, Baroness of the North Pole wrote:
> >>> Aine wrote:
> >>>
> >>>> On Jul 3, 5:37 am, hy <"(hy)hy_biscus"@hotmail.com> wrote:
> >>>>> Aine wrote:
> >>>>>> On Jul 3, 3:44 am, ren <ren1...@hotmail.com> wrote:
> >>>>>>> It isn't ethical for a doctor to treat someone who refuses treatment.
> >>>>>>> But it is ethical for a doctor to convince someone to get treatment.
> >>>>>>> So, you, if you really want to perform a healing on someone, must
> >>>>>>> convince them to let you help them. If they still refuse, I would say
> >>>>>>> that it is unethical for you to perform that spell for them.
> >>>>>>> It isn't unethical to say that you will pray for them considering that
> >>>>>>> some think that spell work with their deities is a form of prayer.
> >>>>>> No means no. Spell, prayer or otherwise. Amazing how arrogant you or
> >>>>>> anyone else is to "believe" you know what is best for people. your
> >>>>>> healing is based on your perception of what is illness or what needs
> >>>>>> fixed. Usually by people who are messed up in the head or their own
> >>>>>> lives they cannot even fix. Ya, you and Hy. Always thinking you know
> >>>>>> best what needs to be fixed in others. No means no. You are both
> >>>>>> unethical.
> >>>>> You are so negative, you have become invisible.<
> >>>> You do not even see your stupidity here.
> >>> Willfully "Blind"!
> >>>
> >> Yes.
> >
> > At least you admit turning a Blind Eye to others ways!
>
> Well, would you suggest something else?

NO, just those of the "MAD HATTER" have their place as well as those who know how
Sane they are!
Especially those who know they are not Sick and demand the right to Heal anothers
Sickness!
Only the SANE question their sanity.
The Insane, know why it is everyone else, but them!!!!!