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

J

james.beauchamp

Hi

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
following

<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>
</xxx:MyContainer>

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

MyControl1.FindControl("TextBox1").

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top