ASP.NET Wrapper Panel
This is a useful control that works like a masterpage but is more lightweight. You can use this control as a wrapper for commonly used html snippets in your code.
This is the code file for the control.
You would use it as follows:
The result would be:
Now you can focus on what’s important and not worry about the wrapping html code.
Also using the TemplateInstance.Single attribute, you can access controls within your wrapper just as you would without it. If you didn’t use it, you willl have to access them using the FindControl function on wrapper control.
Advertisement
No trackbacks yet.