HighTechTalks DotNet Forums  

Extending WebControl - PropertyGrid to hold LinkButton

ASP.net Web Controls microsoft.public.dotnet.framework.aspnet.webcontrols


Discuss Extending WebControl - PropertyGrid to hold LinkButton in the ASP.net Web Controls forum.



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

Default Extending WebControl - PropertyGrid to hold LinkButton - 01-02-2008 , 09:03 AM






Hi there,

I am trying to inherit from an existing webcontrol, however I want to add a
property to the control that will be exposable in the property grid. The
property in question has a type of LinkButton. I want to define the
LinkButton that this control must use(I want to hook it's click event up) at
design time. However I'm having problems with setting it. The property
appears, and lists any current LinkButtons on my webform in a dropdown list,
which is great, but when I select a value, I get the following error similar
to:

"System.Web.HttpParseException: Cannot create an object of type
'System.Web.UI.WebControls.LinkButton' from its string representation
'linkButtonGo' for the 'GoButton' property."

I think I have to implement a TypeConverter or something along those lines,
but I haven't had any success with that becasue quite frankly im not too sure
exaclty what I need to do to prevent this exception. Can someone please help
me out here?

Thanks in advance,
Kevin

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.