473,466 Members | 1,336 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

DefaultValue Property attribute in design time

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
2 1290
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Guy | last post by:
Guys Hope someone can help me! I'm having real problems getting properties I type against a control I have written at design time I have written a control by inheriting from the Button control....
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
1
by: Stephen | last post by:
I have a form with a ListBox and would like to set the DataSource property at design-time but I can't seem to declare any kind of variable that will show up in the list. I have tried a traditional...
4
by: Stephen | last post by:
IN VB.NET I have a form with a ListBox and would like to set the DataSource property at design-time but I can't seem to declare any kind of variable that will show up in the list. I have tried a...
2
by: Steve | last post by:
Hi, I would like to set the default value of a property on my control by: but can't because SystemColors.WindowText is not a constant. Microsoft controls do it, can I - is there a work round?...
1
by: --== Alain ==-- | last post by:
Hi, I still have problem updating my custom control at design time. When i change a property of my custom control in the property window, i would like to see this change immediately on my custom...
8
by: tomsiw | last post by:
Hello, I am trying to create a user control which allows the user to enter a collection of items at design-time. Code example: public class MyControl : System.Windows.Forms.UserControl {...
4
by: TS | last post by:
i want to store my regular expressions in a static class with public constants. I want to be able to pass a regular expression's id in a property of a custom textbox so that in aspx page i could...
2
by: Brett Wiltshire | last post by:
Hi, I have subclassed System.Web.UI.Page. (Well done me). Pages in my project should be accessed based on a user's membership to a Role. Membership to a Role is determined by a small API...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.