1

my question is about to PlaceHolders. i have been developing asp.net application.(old application. i never prefer this kinda codes style.)

<asp:PlaceHolder ID="phTemplates" runat="server" EnableTheming="true">
    <ul id="mytemplateTags">
       <li>K1</li>
       <li>K2</li>
    </ul>
</asp:PlaceHolder>

How can i get K1,K2 by using C# codes. i tried below codes but it doesn't work :

public List<UserTemplate> Templates
{
    get
    {
        var templates = phTemplates.Controls.AsQueryable();
        return null;
    }
    set {}
}
4castle
  • 32,613
  • 11
  • 69
  • 106
Penguen
  • 16,836
  • 42
  • 130
  • 205
  • 1
    Here is a question about getting content of placeholder: http://stackoverflow.com/questions/14321937/aspplaceholder-contents-to-string – Sebastian Siemens May 18 '16 at 06:51
  • 1
    I've never personally used it, but from what I understand I think the [Html Agility Pack](https://htmlagilitypack.codeplex.com/) might help – freefaller May 18 '16 at 07:11

0 Answers0