By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,960 Members | 987 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,960 IT Pros & Developers. It's quick & easy.

DefaultValue Property attribute in design time

P: n/a
job
I'm having trouble getting the DefaultValue property attribute on my
server control show up in design time.

Here my property code:

<Bindable(True), _
Category("Misc"), _
DefaultValue("myDefaultValue")> _
Public Property MyProperty() As String
Get
Return m_MyProperty
End Get
Set(ByVal Value As String)
m_MyProperty = Value
End Set
End Property

The property shows up fine in the property tab group, but the value is
not set to the default value set in the property attribute.

/M

Mar 21 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi,

You need to initialize the variable "m_MyProperty" as well to the
"myDefaultValue" string.

This post relates to a similar question :

http://groups.google.com/group/micro...d4f67f9b32323a

HTH,

Regards,

Cerebrus.

Mar 21 '06 #2

P: n/a
job

Thanks. I thought setting the attrib would do the trick

On 21 Mar 2006 02:02:56 -0800, "Cerebrus" <zo*****@sify.com> wrote:
Hi,

You need to initialize the variable "m_MyProperty" as well to the
"myDefaultValue" string.

This post relates to a similar question :

http://groups.google.com/group/micro...d4f67f9b32323a

HTH,

Regards,

Cerebrus.

Mar 21 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.