Re: Why use <%= %> ?
From: Eliyahu Goldin (removemeegoldin_at_monarchmed.com)
Date: 01/24/05
- Next message: ACaunter: "Go to Login Page when session expires"
- Previous message: Gravy: "Re: Using a c# assembly client side"
- In reply to: Alan Silver: "Why use <%= %> ?"
- Next in thread: Alan Silver: "Re: Why use <%= %> ?"
- Reply: Alan Silver: "Re: Why use <%= %> ?"
- Messages sorted by: [ date ] [ thread ]
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)
- Next message: ACaunter: "Go to Login Page when session expires"
- Previous message: Gravy: "Re: Using a c# assembly client side"
- In reply to: Alan Silver: "Why use <%= %> ?"
- Next in thread: Alan Silver: "Re: Why use <%= %> ?"
- Reply: Alan Silver: "Re: Why use <%= %> ?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|