Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > How to add Style property to User Control

Reply
Thread Tools

How to add Style property to User Control

 
 
Steve Trandahl
Guest
Posts: n/a
 
      10-29-2007
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
 
 
 
 
Aamir Ghanchi
Guest
Posts: n/a
 
      11-27-2007
I also got into the same situation. Will appreciate if anyone has the
solution.
thanks
On Oct 29, 11:17 am, Steve Trandahl
<(E-Mail Removed)> 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?


 
Reply With Quote
 
 
 
 
Gerry Polucci
Guest
Posts: n/a
 
      12-01-2007
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
 
Steve Trandahl
Guest
Posts: n/a
 
      12-02-2007
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?

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
User Control to Control Other User Control Jonathan Wood ASP .Net 4 02-02-2010 03:41 PM
persisting changes to a control outside a user control from the user control? Mad Scientist Jr ASP .Net 0 03-22-2006 08:02 AM
When/Should we use CssClass property or Style property? Sky ASP .Net Web Controls 2 10-01-2004 07:38 AM
Need help with Style conversion from Style object to Style key/value collection. Ken Varn ASP .Net Building Controls 0 04-26-2004 07:06 PM



Advertisments