asp.net - Problems injecting server side variables using <%# -
i having problems inserting string following tag :
<tr id="rowbulkoptions" style='<%# sbulkoptionsrowstyle %>'> don't ask why i'm using tables :)
sbulkoptionsrowstyle public string in aspx.vb file.
seemingly way can render put
page.databind() in page_load, page_prerender etc.. causes me problems because page.databind() binds all controls on page.
i use <%= part of code inserts controls page , apparently can't use <%= , insert controls.
is there way can 'look, put sbulkoptionsrowstyle page please!' ?
thanks.
the <%# tag used when binding repeating control, take not doing?
as dynamically modifying controls stated can not use <%=.
my suggestion add tag runat="server" tr , assign variable style attribute of control within page load/init of code behind.
e.g.
<tr id="rowbulkoptions" runat="server"> and in code behind
rowbulkoptions.attributes["style"] = sbulkoptionsrowstyle;
Comments
Post a Comment