Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - Persistence problem with custom control property using PersistenceMode.InnerProperty

 
Thread Tools Search this Thread
Old 01-06-2005, 02:52 AM   #1
Default Persistence problem with custom control property using PersistenceMode.InnerProperty


I'm having trouble getting my custom control to save properties that are
decorated with the PersistenceMode.InnerProperty attribute. The properties
that are saved with PersistenceMode.Attribute are saved OK.
The contents of the ASPX file only contains the attribute, not the inner
property:

<cc1:MyTestClass id="MyTestClass1" runat="server"
S1="a"></cc1:MyTestClass>

Here's the code I'm testing with:

'-------------------------------------------------------------
Imports System.ComponentModel
Imports System.Web.UI
Imports System.Web.UI.webcontrols

<PersistChildren(False), _
Serializable(), _
ParseChildren(True)> _
Public Class MyTestClass
Inherits Control
Private _s1, _s2 As String
Private _style As Style

<DesignerSerializationVisibility(DesignerSerializa tionVisibility.Visible),
_
NotifyParentProperty(True), _
PersistenceMode(PersistenceMode.Attribute)> _
Public Property S1() As String
Get
Return _s1
End Get
Set(ByVal Value As String)
_s1 = Value
End Set
End Property
<DesignerSerializationVisibility(DesignerSerializa tionVisibility.Visible),
_
NotifyParentProperty(True), _
PersistenceMode(PersistenceMode.InnerProperty)> _
Public Property S2() As String
Get
Return _s2
End Get
Set(ByVal Value As String)
_s2 = Value
End Set
End Property
End Class




jahyen
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamically added TreeNode Control not render my custom attribute venkyzealous Software 0 05-10-2008 03:46 PM
Custom control dropdownlist - need advice tcstom Software 0 04-18-2008 11:28 AM
Getting error in Custom control ShakilaRahmanLaboni Software 2 08-01-2007 02:38 PM
ASP.NET: User Control Events is Not Displaying in a Property Window BabuA Software 0 09-14-2006 05:44 PM
JVC remote control - weird problem Robb Scott DVD Video 0 08-17-2004 12:01 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46