Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ME:NewControl ID="tblCustomList" runat="server">
- // ... these controls will be used in my UserControl.aspx
- </ME:NewControl>
- <asp:Table ID="tblNormal" runat="server">
- <asp:TableRow>
- <asp:TableCell>Thing 1</asp:TableCell>
- <asp:TableCell>Thing 2</asp:TableCell>
- </asp:TableRow>
- </asp:Table>
- <ME:NewControl ID="tblCustomList" runat="server">
- <asp:TableRow>
- <asp:TableCell>Thing 1</asp:TableCell>
- <asp:TableCell>Thing 2</asp:TableCell>
- </asp:TableRow>
- </ME:NewControl>
- public TableRow DTHeader { get; set; }
- protected override void OnInit(EventArgs e)
- {
- tblCollection.Rows.Add(DTHeader);
- base.OnInit(e);
- }
- <ME:NewControl ID="tblCustomList" runat="server">
- <DTHeader>
- <asp:TableCell></asp:TableCell>
- //...
- </DTHeader>
- </ME:NewControl>
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Security.Permissions;
- namespace Samples.AspNet.CS.Controls
- {
- [AspNetHostingPermission(SecurityAction.Demand,
- Level = AspNetHostingPermissionLevel.Minimal)]
- public sealed class CustomTableCreateControlCollection : Table
- {
- protected override ControlCollection CreateControlCollection()
- {
- // Return a new ControlCollection
- return new ControlCollection(this);
- }
- }
- }
Add Comment
Please, Sign In to add comment