1
Reply

How to Get InnerHTML of Div

Soft Corner

Soft Corner

Dec 11 2013 12:38 AM
13.5k
Hi,

 I have to get an InnerHTML of Div which contains user controls. I am trying to get directly but its not working 
Error: cannot get inner content of MainPanel because the contents are not literal

   Dim litHtml As New Literal
   litHtml.Text = MainPanel.InnerHtml

 <div id="MainPanel" runat="server" enableviewstate="true">
        <table width="100%">
            <tr>
                <td>
                    <uc1:ucStatistics ID="ucStatistics1" runat="server" />
                </td>
            </tr>
        </table>
</div>

Answers (1)