.net - Add dynamic dotnet webcontrol into attribute value of static html -


easy 1 explain. there way can this:

<div id="header" style='<asp:literal runat="server" id="litbackgroundimage"></asp:literal>' > 

it looks valid, visual studio not recognise litbackgroundimage valid control in code-behind. setting div runat="server" won't work either because style property read-only.

any suggestions gratefully received

add runat="server" div , can access server-side, can set style attribute dynamically.


Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -