Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Property is loosing value

Reply
Thread Tools

Property is loosing value

 
 
MBO
Guest
Posts: n/a
 
      07-28-2005
Hello NG,

I've created a custom component inherited from
"System.Web.UI.Webcontrold.Button" and added a new String Property

....

Private _waitMessage As String

<Bindable(True), Category("Appearance"), DefaultValue("Please Wait")> Public
Property [WaitMessage]() As String

Get
Return _waitMessage
End Get
Set(ByVal Value As String)
_waitMessage = Value
End Set
End Property

....

If I'm using the component, I can set the property in the property editor,
but when I built the project it is set back to an empty string. I found out
that when I add the component the following code is added to the webform:

....

<cc1leaseWaitButton id="PleaseWaitButton1" style="Z-INDEX: 101; LEFT:
392px; POSITION: absolute; TOP: 208px"
runat="server" Text="Search" Width="440px"
Height="128px"></cc1leaseWaitButton>

....

It seems that the "WaitMessage" attribute is missing, if I manually add the
attribute like


<cc1leaseWaitButton id="PleaseWaitButton1" style="Z-INDEX: 101; LEFT:
392px; POSITION: absolute; TOP: 208px"
runat="server" Text="Search" WaitMessage="Please Wait" Width="440px"
Height="128px"></cc1leaseWaitButton>

....

the probelm is solved, the property holds its value also when I build the
project.

What do I need to change in the property or component, that the
"WaitMessage" attribute is inserted automatically when I insert the
component to a webform ?

Thanks and Regards

MBO



 
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
loosing a session value CreativeMind ASP .Net 3 04-03-2009 05:53 PM
Checking input fields(text) value when field is loosing focus JohnnyW Javascript 6 03-18-2006 09:09 PM
Property is loosing value MBO ASP .Net Web Controls 3 07-29-2005 01:18 PM
Property is loosing value after bulid MBO ASP .Net 0 07-27-2005 08:39 AM
Loosing property values; and design time rendering Mark Norgate ASP .Net Web Controls 0 08-24-2003 09:46 PM



Advertisments