"Jeremy S" <> wrote in
news:u4xYC$:
> Both of the following work (i.e., they declare a Web Server control).
>
> <asp
ropDownList ID=DropDownList1 runat=server></asp
ropDownList>
> <asp
ropDownList ID="DropDownList2"
> runat="server"></asp
ropDownList>
>
> The only difference is that the attribute values are wrapped in
> quotes, or they are not wrapped in quoted.
>
> Given that both work (i.e., no compiler or runtime errors), do the
> quotes matter for any other purpose? Is there any good reason to
> include or exclude the quotes?
Quotes are proper form and required for some DOCTYPES. And while things
might not "blow up" if you do not use the quotes, you may find your code
not working in the future when MS decides to become more XML compliant
with their output code.
The VS editor, as you move forward in time, gets better at XHTML
compliance and will do more to put in quotes for you. Some third party
tools also put in the quotes, even when VS does not.
The only reason I can see for not putting in quotes, server side or
otherwise, is you are saving two keystrokes per thing you code, but
since there is a potential downside risk, and the time savings for two
strokes is so small, I think it is rather insane not to type them in.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Twitter: @gbworld
Blog:
http://gregorybeamer.spaces.live.com
*******************************************
| Think outside the box! |
*******************************************