On Mar 13, 8:47 am, ajf...@blueyonder.co.uk wrote:
> hi,
>
> I have an asp.net webform that contains some source like this
>
> <img src="..."><asp:hyperlink id=".." runat="server"...>
>
> with no whitespace between the tags. when the page is rendered, it
> comes out like this:
>
> <img src="..."> <asp:hyperlink id=".." runat="server"...>
>
> there are 2 tab characters between the end of the img tag and the
> hyperlink tag which cause a space to appear where I don't want it in
> the HTML.
>
> I have this exact sequence repeated in many places in the application
> (several times on the same page) and there are 2 that behave in this
> way, but I can't find any rhyme nor reason for it. there is no funny
> character in the source file.
>
> anyone else seen this problem? any ideas for a workaround?
>
> Andy
It's not ASP.NET 1.1 that's the culprit. It's your editor (likely
Visual Studio .NET 2002 or 2003). Both versions of Visual Studio are
notorious for mangling your HTML into what *they* want it to look
like, regardless of your best efforts to make it look the way *you*
want it.
It's a constant source of frustration.
In the end, however, unless the end-users are going to view the HTML,
or you're generating HTML to be parsed by a nitpicking parser that
can't handle the extraneous whitespace, the layout shouldn't matter.
It's an annoyance, and nothing more.
|