inline code to populate placeholder VB.NET

276 Views Asked by At

I have a problem in so much that I can't find the most upto date version of a site we've created. I have an older version but I can't remember all the changes that have been done. They've requested some changes be done to the site while a new one is in dev. What I'm attempting is below

Page:

<div class="ContentText550">
    <asp:placeholder id="phContent" runat="server" />
    <% Dim objData As New DAL
        objData.Content_DataReader("pagetitle", Page.Header, phContent)%>
</div>

Class:

Public Overloads Sub Content_DataReader(ByVal sPage As String, _
                                            ByVal pHeader As HtmlHead, _
                                            ByVal phContent As PlaceHolder)

    <-- Code here to read from database -->

    If Not IsDBNull(dr("content_body")) Then phContent.Controls.Add(New LiteralControl(dr("content_body")))

It's not populating the placeholder with anything. Is there a quick solution to this.

0

There are 0 best solutions below