Can't set text in inherited control
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngcontrolsvb' list.


Anders.Vikstrom@banqit.com
Hi,

I'm trying to create my own radio button and check box control through
inheritance. However, there seems to be a problem overriding the text
property. If I set the text in design mode the controls becomes invalid
after I compile. If I remove the Text attribute from the HTML it =
becomes
valid again. What could possible be wrong with the following code:

Public Class RadioButton
Inherits System.Web.UI.WebControls.RadioButton

Public Overrides Property Text() As String
Get
Return MyBase.Text
End Get
Set(ByVal Value As String)
MyBase.Text =3D Value
End Set
End Property

End Class

If anyone has clue, please let me know, cuz I ain't got any.

Reagards,

Anders Vikstr=F6m
SW Engineering, BANQIT AB
http://www.banqit.com
mailto:Click here to reveal e-mail address
Phone: +46 8 7594737

Reply to this message...
 
    
Anders.Vikstrom@banqit.com
Hi,=20

I'm sorry if I'm repeating my self, but since I never received this =
mail
from the list my self, I believe it was lost some how and I'm therefore
reposting it:

----

I'm trying to create my own radio button and check box control through
inheritance. However, there seems to be a problem overriding the text
property. If I set the text in design mode the controls becomes invalid
after I compile. If I remove the Text attribute from the HTML it =
becomes
valid again. What could possible be wrong with the following code:

Public Class RadioButton
Inherits System.Web.UI.WebControls.RadioButton

Public Overrides Property Text() As String
Get
Return MyBase.Text
End Get
Set(ByVal Value As String)
MyBase.Text =3D Value
End Set
End Property

End Class

If anyone has clue, please let me know, cuz I ain't got one.

Regards,

Anders Vikstr=F6m
SW Engineering, BANQIT AB
http://www.banqit.com
mailto:Click here to reveal e-mail address
Phone: +46 8 7594737

Reply to this message...
 
 
System.Web.UI.WebControls.RadioButton
System.Windows.Forms.RadioButton




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com