P
Peter Rilling
Below is some code that I do not know why it does not work. Okay, as you
can see it is simple HTML with two ASP:Label controls. Each label has some
code that basically gets a string that will be written to the browser.
ConditionalText.Eval is a method from my own library. As you can see, I
have written some static text before and after the first Eval call. If I
open this page, I get no content in the Label, even the static content. I
just get "<span id="lblScenario"
style="font-size:17px;font-weight:bold;"></span>". Now, suppose that I
remove first Eval call and open the page again, I get "<span
id="lblScenario"
style="font-size:17px;font-weight:bold;">sdfsadffdsfsda</span>", which this
time contains the static content as expected. I have even removed my
reference to Eval and just placed static content in the <% %> block and the
same thing happens. Any ideas at what the server is doing?
<form id="Form1" method="post" runat="server">
aaaaaaaa
<table>
<TR>
<TD vAlign="top">
<asp:Label id="lblScenario" Font-Size="17px" Font-Bold="True"
Runat="server">sdfsadf<%= ConditionalText.Eval("ADMIN_MARKET_HEADER")
%>fdsfsda</asp:Label>
<br>
<br>
<asp:Label id="lblScenarioExpl" Font-Bold="False" Runat="server">
<%= ConditionalText.Eval("ADMIN_MARKET_INSTRUCTION") %>
</asp:Label>
</TD>
</TR>
</table>
bbbbbbbb
</form>
can see it is simple HTML with two ASP:Label controls. Each label has some
code that basically gets a string that will be written to the browser.
ConditionalText.Eval is a method from my own library. As you can see, I
have written some static text before and after the first Eval call. If I
open this page, I get no content in the Label, even the static content. I
just get "<span id="lblScenario"
style="font-size:17px;font-weight:bold;"></span>". Now, suppose that I
remove first Eval call and open the page again, I get "<span
id="lblScenario"
style="font-size:17px;font-weight:bold;">sdfsadffdsfsda</span>", which this
time contains the static content as expected. I have even removed my
reference to Eval and just placed static content in the <% %> block and the
same thing happens. Any ideas at what the server is doing?
<form id="Form1" method="post" runat="server">
aaaaaaaa
<table>
<TR>
<TD vAlign="top">
<asp:Label id="lblScenario" Font-Size="17px" Font-Bold="True"
Runat="server">sdfsadf<%= ConditionalText.Eval("ADMIN_MARKET_HEADER")
%>fdsfsda</asp:Label>
<br>
<br>
<asp:Label id="lblScenarioExpl" Font-Bold="False" Runat="server">
<%= ConditionalText.Eval("ADMIN_MARKET_INSTRUCTION") %>
</asp:Label>
</TD>
</TR>
</table>
bbbbbbbb
</form>