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

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -