[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

microsoft.public.dotnet.framework.aspnet.buildingcontrols

How to add Style property to User Control

Steve Trandahl

10/29/2007 5:17:00 PM

I am trying to add a simple Style property to our base User Control. Even if
I add it as a simple string type, I get the error "Operation GetValue on the
component did not succeed, generating the error code 0x80020005." in the
property window for the property. It seems to be indicating a type mismatch.
If I rename the property to something else, it works fine. Since User
Controls don't have a style property to hide or override, why am I getting
this problem?
3 Answers

Aamir Ghanchi

11/27/2007 12:04:00 AM

0

I also got into the same situation. Will appreciate if anyone has the
solution.
thanks
On Oct 29, 11:17 am, Steve Trandahl
<SteveTrand...@discussions.microsoft.com> wrote:
> I am trying to add a simple Style property to our base User Control. Even if
> I add it as a simple string type, I get the error "Operation GetValue on thecomponentdid not succeed, generating the error code0x80020005." in the
> property window for the property. It seems to be indicating a type mismatch.
> If I rename the property to something else, it works fine. Since User
> Controls don't have a style property to hide or override, why am I getting
> this problem?

Gerry Polucci

12/1/2007 8:25:00 PM

0

Steve, did you ever find the solution to this problem? I am running into it
as well.

Thanks,
Gerry

"Steve Trandahl" wrote:

> I am trying to add a simple Style property to our base User Control. Even if
> I add it as a simple string type, I get the error "Operation GetValue on the
> component did not succeed, generating the error code 0x80020005." in the
> property window for the property. It seems to be indicating a type mismatch.
> If I rename the property to something else, it works fine. Since User
> Controls don't have a style property to hide or override, why am I getting
> this problem?

Steve Trandahl

12/2/2007 12:24:00 AM

0

Unfortunately no. I ended up naming the property ControlStyle. It still
renders a style tag in the control, but I didn't figure out how to name the
property Style. :(

"Gerry Polucci" wrote:

> Steve, did you ever find the solution to this problem? I am running into it
> as well.
>
> Thanks,
> Gerry
>
> "Steve Trandahl" wrote:
>
> > I am trying to add a simple Style property to our base User Control. Even if
> > I add it as a simple string type, I get the error "Operation GetValue on the
> > component did not succeed, generating the error code 0x80020005." in the
> > property window for the property. It seems to be indicating a type mismatch.
> > If I rename the property to something else, it works fine. Since User
> > Controls don't have a style property to hide or override, why am I getting
> > this problem?