C
clintonG
Simply a postulation but consider the following...
// breaks when declared in content page that uses a MasterPage
<img src="App_Themes/SmokeAndGlass/Images/smoke_METRO184x26.gif" />
// must run as a web server control
<img src="App_Themes/SmokeAndGlass/Images/smoke_METRO184x26.gif"
runat="server" />
However... When we want to change themes dynamically how do we modify the
value of the path for the src attribute at runtime? In ASP we used
Response.Write code blocks <%= %> the .NET equivalent of which are not
allowed in web server control declarations hence the postulation as we are
apparently missing the functional construct.
What I thought I need is the following in my HTML...
<img src="App_Themes/<%= Request.Cookies["themeName"].Value; %>/Images/<%=
Request.Cookies["themePrefix"].Value; %>METRO184x26.gif" />
runat="server" />
I've tried different quoting types but I'm not getting it right.
I've tried a binding syntax <%# %> and am not getting it right.
Surely this is me as I can't imagine the design of 2.0 is this seriously
flawed that the entire img element would have to be built in code when using
MasterPages that require dynamic Theme selections.
<%= Clinton Gallagher
// breaks when declared in content page that uses a MasterPage
<img src="App_Themes/SmokeAndGlass/Images/smoke_METRO184x26.gif" />
// must run as a web server control
<img src="App_Themes/SmokeAndGlass/Images/smoke_METRO184x26.gif"
runat="server" />
However... When we want to change themes dynamically how do we modify the
value of the path for the src attribute at runtime? In ASP we used
Response.Write code blocks <%= %> the .NET equivalent of which are not
allowed in web server control declarations hence the postulation as we are
apparently missing the functional construct.
What I thought I need is the following in my HTML...
<img src="App_Themes/<%= Request.Cookies["themeName"].Value; %>/Images/<%=
Request.Cookies["themePrefix"].Value; %>METRO184x26.gif" />
runat="server" />
I've tried different quoting types but I'm not getting it right.
I've tried a binding syntax <%# %> and am not getting it right.
Surely this is me as I can't imagine the design of 2.0 is this seriously
flawed that the entire img element would have to be built in code when using
MasterPages that require dynamic Theme selections.
<%= Clinton Gallagher