Re: Why use <%= %> ?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Eliyahu Goldin (removemeegoldin_at_monarchmed.com)
Date: 01/24/05


Date: Mon, 24 Jan 2005 18:19:38 +0200

Good example. There is nothing in asp.net representing <body> tag, so use of
<%... is appropriate. You can replace <body> with a generic control (then
you will end up with two <body>). Also you might prefer keeping your old asp
style.

Eliyahu

"Alan Silver" <alan-silver@nospam.thanx> wrote in message
news:gO$TmAKLtR9BFwjq@nospamthankyou.spam...
> 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
>
> --
> Alan Silver
> (anything added below this line is nothing to do with me)



Relevant Pages

  • Re: z-index change onclick event
    ... it will apply the style to the <table tag ... representing your grid. ... > id like to change the posistion of a datagrid once a button has been ...
    (microsoft.public.dotnet.framework.aspnet)
  • 11/29/05 SmackDown! = a 1998 Nitro at double speed
    ... In the first hour we get Benoit and Booker T, representing ... the cruiserweights, the older stables such as the Horsemen, and the tag ...
    (rec.sport.pro-wrestling)
  • Re: sed - replacing a block of text with a line.
    ... > With AAA representing the tag that identifies the beginning of the ... > style sheets, and BBB the tag that identifies the end, and CCC being ... Alan C this post ends with w ...
    (comp.unix.shell)