GregD Posted October 12, 2004 Posted October 12, 2004 I have included an iframe in my datagrid and im trying to put <%# Container.DataItem("article").Trim()%> into the iframe like a wysiwyg editor. The datagrid is in a usercontrol. Ive tried: iView.document.write('<%# Container.DataItem("article").Trim()%>') iView.document.close() In my aspx where iView is the ID of my iframe... but i just get 'DataItem' is not a member of 'System.Web.UI.Control'. Ive tried putting the javascript in the user control but no luck there either. Anyone been able to do this? Thanks Quote
Jeff B Posted October 19, 2004 Posted October 19, 2004 Ive tried putting the javascript in the user control but no luck there either. 1) <%# Container.DataItem("article").Trim()%> is not javascript but vb.net code used for data binding. 2) You should try using <%# DataBinder.Eval(Container.DataItem, "article")%> instead of <%# Container.DataItem("article").Trim()%>. Jeff B Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.