forum

Home / DeveloperSection / Forums / Dynamic data in Repeater

Dynamic data in Repeater

Anonymous User 1555 28-Aug-2014

in my webpage different users can visit same profile, but users can be either Owner of a profile, or Visitors, and content have to change for those two conditions.

if visitor check profile he see this editor:

<asp:Repeater id="UserLoginRepeater" runat="server">
        <HeaderTemplate>
        </HeaderTemplate>
        <ItemTemplate>
           <asp:Label ID="Label2" runat="server">label Text</asp:Label> <asp:Label runat="server">label text 2</asp:Label>
            </br>
            <asp:Button runat="server" Text="TestButton"/>
            </br>
         <asp:Label ID="Label3" runat="server">Test</asp:Label>   <textarea><%# Eval("Content") %></textarea>
              </br>
              </br>
        </ItemTemplate>
        <FooterTemplate>
        </FooterTemplate>
 </asp:Repeater>

codebehinde:

if User is Owner of a profile TextArea have to be replaced by a label and an other label with textbox have to be added.

What would be the best way to Load controls dynamicly into Repeater?


Updated on 28-Aug-2014
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By