Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Inner content persistance

Thread Tools

Inner content persistance

Posts: n/a
In my custom control I am parsing sub properties between my controls tags.
The elements in between the tags should form a collection property but will
also contain controls themselves. In this scenario I am slightly confused as
it appears you should use ParseChildren(true, "<defaultproperty>") when the
inner content is to be parsed as properties or PersistChildren(true) when the
inner content is to be parsed as controls. What if you want both conditions?

One way I have implemented this is to parse the inner contents using
ParseChildren(true) and then to override CreateChildControls method and add
the inner controls through the property collection to the control tree. When
using ParseChildren(true) the method AddParseSubObject does not fire and
therefore how should I inspect the contents between my tags when they are
parsed so that I can test declarative attributes and raise exceptions if
required. Should I be looking to override the ControlBuilder class?

Any help would be much appreciated.

Reply With Quote

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
error: Only Content controls are allowed directly in a content page that contains Content controls. hazz ASP .Net 6 06-09-2010 01:54 PM
failing to instantiate an inner class because of order of inner classes Pyenos Python 2 12-27-2006 11:19 PM
Persistance,Persistance,Persistance MHPNW STAFF Windows 64bit 5 05-24-2005 09:29 PM
inner classes in python as inner classes in Java Carlo v. Dango Python 14 10-19-2003 08:49 AM
collection of Objects persistance Atif Jalal ASP .Net 0 08-13-2003 02:58 PM