.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

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

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -