Since I have a field, which contain html content, in dataset returned from database. I want to sue a div to display the html content by using
div.innerHtml=...
I can find div control in Repeater1_ItemDataBound event but don’t know how to bind that field to the control. That field is called ‘actualContent’. I think write
div.innerHtml=<%=actualContent%> won't work in backend
Then how to bind that field? Thank you in advance.
Add runat=”server” to the div, and put your content in between the tagsm like this:
ASPX
Literal method:
DIV method:
Code behind
Literal method:
DIV method: