469,927 Members | 1,874 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,927 developers. It's quick & easy.

Creating a web control with editable regions (template control?)


I'm trying to create a control with multiple regions that can be
edited - maybe as templates I guess.

I've seen a control that was done by Scott Mitchell which has rounded
corners surrounding the control - here is a link to the page
http://aspnet.4guysfromrolla.com/articles/081104-1.aspx) and this
essentially has one editable region that will then be surrounded by
the borders.

What I'm trying to achieve is a control with 2 or more areas that may
be templates (or not) but allow me to put the control on the page and
then include other elements.

The key things I want to achieve are that I can do similar to the

<xxx:MyContainer id="MyControl1" runat="server>
<area1>Some stuff including controls</area1>
<area2>Some more stuff including controls eg <asp:TextBox id="TextBox1
etc etc></asp:TextBox></area2>

What I then want is that when this displays something like a table
will surround the 2 areas -- like a regular Html table with borders
etc - I cant really upload an image to best describe this but
hopefully you can get the idea.

Then in the page that has the MyContainer control I can directly refer
to the control TextBox1 rather than having to do something like


I know this is sort of possible using ParseChildren and
PersistChildren and I have played with template controls but what
happens is the templates are display away from the rest of the
elements (Html table like stuff) I want to include. If I ignore the
Parse and Persist children stuff it works BUT I cant get direct access
to the control and have to resort to FindControl to get to the control

Any ideas?

James Beauchamp

Jun 21 '07 #1
0 1001

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Martin | last post: by
9 posts views Thread by Niels Jensen | last post: by
8 posts views Thread by Spleenwort | last post: by
5 posts views Thread by MarGera332 | last post: by
1 post views Thread by wizardry | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.