Click here to Skip to main content
15,887,812 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more:
I want to create a web server control with two panel, the top one to contain a predefined table with defined items and height

The second one inside the contents tag (Must be able to work with both code and designer - able to add controls to the contents via drag and drop in designer).

ASP.NET
<MyControl id="mycontrol"  runat="server">
<contents>
 ...
</contents>


Hopefully you can help

Thanks,

Tony Kress
Posted
Updated 8-Jun-12 21:03pm
v2
Comments
Shahin Khorshidnia 9-Jun-12 3:04am    
Good question

1 solution

hi,
That is a good and nice question. In order to do that, you need to create a Templated User Control, or Templated Custom control. Using this custom user control or custom control, you can define every tag into your control which will be rendered via asp.net. Here are a couple of links. This posts will not create your exact control, but will teach you how to create templated controls:

Custom Templated control:
http://msdn.microsoft.com/en-us/library/aa478964.aspx[^]

Templated User Control:
Creating a Templated User Control[^]

I hope it helps,
Cheers
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900