html - InnerHtml of div is always empty -
i have next html :
<div class="output"> <div id="divinternet" runat="server" class="issue"> <!--this message shows regardless of choice--> <p> if operate service connects internet , intend collect any... </p> </div> </div>
on server side try innerhtml
of div
id divinternet
:
var q1text = divinternet.innerhtml;
but q1text
empty.
i try add attribute runat="server"
inner p
throws exception innerhtml must literal.
expected result - want <p>
, content:
<p> if operate service connects internet , intend collect any... </p>
what have missed?
upd: didn't mention on start, think important.
more detailer content of div :
<p> if operate service connects internet , intend collect <a href= "<%=project.core.common.publisherconfigurationmanager.navigation%>privacy/faq.aspx#16" target="_blank" class="dotlink">personal information</a>... </p>
so there tag contains data config.
try
var q1text = new stringbuilder(); divinternet.rendercontrol(new htmltextwriter(new stringwriter(q1text)));
Comments
Post a Comment