asp.net - Expose ListView ItemTemplate inside UserControl and allow markup? -


I am trying to create a UserControl that contains a ListView and many other controls / methods that we are repeating every list We make it.

Is it possible to expose item template property and markup is allowed for it when using UserControl? I essentially want to add properties in ListView, but instead of creating all the wrapping controls for programming, allows for ease of design in ASCX.

Markup for UserControl so far;

  & lt;% @ Control language = "C #" AutoEventWireup = "true" CodeBehind = "SuperListView.ascx.cs" Inheritance = "sandbox.superlist view"%> ; & Lt; Div class = "listwrapper" & gt; & Lt; H1 & gt; & Lt; Asp: label id = "lbl_heeader" runat = "server" /> & Lt; Asp: button id = "cmd_CreateNew" runat = "server" CssClass = "create" /> & Lt; / H1> & Lt; Asp: panel id = "pnl_filter" runat = "server" & gt; & Lt; H3 & gt; & Lt; Asp: label id = "lbl_filter" runat = "server" /> & Lt; / H3 & gt; & Lt; Asp: panel id = "pnl_filterContents" runat = "server" & gt; & Lt; / ASP: Cell & gt; & Lt; Asp: button id = "cmd_apple" runat = "server" /> & Lt; Asp: button id = "cmd_Clear" runat = "server" /> & Lt; / ASP: Cell & gt; & Lt; Asp: ListView id = "frm_Data" runat = "server" & gt; & Lt; Layout Template & gt; & Lt; Div id = "item place holder" runat = "server" /> & Lt; / Layout templates & gt; & Lt; / ASP: ListView & gt; & Lt; / Div & gt;   

What do I expect to do with this user control;

  & lt; Uc: SuperListView id = "frm_MyData" runat = "server" header = "my data" & gt; & Lt; ItemTemplate & gt; & Lt;% # Container.Dataite% & gt; & Lt; / ItemTemplate & gt; & Lt; / UC: SuperListView & gt;    

You have to develop a custom server control to do this, which may be Practical if you have other controls in user control

It may be possible to expose this item plaque, but user control (ASX) does not support child / nested elements, is needed.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -