Search code examples
c#asp.netcontentplaceholder

How can I apply this to a contentPlaceHolder in ASP.net?


#control {
position: absolute;
right: 0px;
top: 0px;
}

Solution

  • You cannot. That's because ContentPlaceHolder does not render to anything on a page.

    You can however wrap a div around it and then apply the styles to it:

    <div class="control">
        <asp:ContentPlaceHolder runat="server" ID="Content" />
    </div>