A
Alan Silver
Hello,
Newbie alert, so please be patient <g>
I ASP Classic, we were used to using tricks like ...
<%=strName%>
to insert dynamic content into an HTML block. In ASP.NET, you have
various controls like the label that seem to do the same thing, but with
much more power and flexibility. If so, is there any reason to use <%=
%> at all?
I only ask as I am reading ASP.NET Unleashed, and he shows an example of
using this. I couldn't see why he didn't just use a control. Granted his
example was something like ...
<body bgcolor="<%=strColour%>">
where he was including an attribute for a tag, rather than a whole tag,
but he already mentioned a generic control that just produced the basic
text rather than a tag, so why not use that?
TIA
Newbie alert, so please be patient <g>
I ASP Classic, we were used to using tricks like ...
<%=strName%>
to insert dynamic content into an HTML block. In ASP.NET, you have
various controls like the label that seem to do the same thing, but with
much more power and flexibility. If so, is there any reason to use <%=
%> at all?
I only ask as I am reading ASP.NET Unleashed, and he shows an example of
using this. I couldn't see why he didn't just use a control. Granted his
example was something like ...
<body bgcolor="<%=strColour%>">
where he was including an attribute for a tag, rather than a whole tag,
but he already mentioned a generic control that just produced the basic
text rather than a tag, so why not use that?
TIA