HighTechTalks DotNet Forums  

How to add Style property to User Control

ASP.net Building Controls microsoft.public.dotnet.framework.aspnet.buildingcontrols


Discuss How to add Style property to User Control in the ASP.net Building Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Steve Trandahl
 
Posts: n/a

Default How to add Style property to User Control - 10-29-2007 , 12:17 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?

Reply With Quote
  #2  
Old   
Aamir Ghanchi
 
Posts: n/a

Default Re: How to add Style property to User Control - 11-26-2007 , 06:04 PM






I also got into the same situation. Will appreciate if anyone has the
solution.
thanks
On Oct 29, 11:17 am, Steve Trandahl
<SteveTrand... (AT) discussions (DOT) microsoft.com> wrote:
Quote:
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?


Reply With Quote
  #3  
Old   
Gerry Polucci
 
Posts: n/a

Default RE: How to add Style property to User Control - 12-01-2007 , 02:25 PM



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

Thanks,
Gerry

"Steve Trandahl" wrote:

Quote:
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?

Reply With Quote
  #4  
Old   
Steve Trandahl
 
Posts: n/a

Default RE: How to add Style property to User Control - 12-01-2007 , 06:24 PM



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:

Quote:
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?

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.