VS2005 How to 'format' a long HTML Attribute

K

KCS

Hi. I have a vs2005 custom web control. It uses a designer inherited from
ControlDesigner. The designer writes an XML value as a string property into
the control which the IDE inserts into the HTML source.

Example: <myControl MyAttribute="<RootNode><SubNode> ... representing a
potentially long piece of XML" />

In vs2003, 'myAttribute' gets automatically split into several lines if it
is long.

In vs2005, 'myAttribute' is all on the one line.

How do I get the html to be spread over multiple lines?

Example: <myControl MyAttribute="<RootNode>
<SubNode>
more XML" />

I tried using 'GetPersistenceContent' but I think this is only for use when
the control renders and not when changing property values. Note the attribute
value is in quotes so you cannot insert crlf's as these get changed into
escaped values.

Thanks
 
D

DWS

KCS,
Its probably by design ***new in VS2005 right click format source***. This
wouldn't be a problem unless the format source option did not work correctly
with the long property value. Also to preserve embedded spaces in properties
its definately a better practice to keep them on one line.

Good Luck
DWS

PS Please vote for one of my designs "Software" or the "The Hand is Quicker
Than the Eye" http://blog.mix06.com/contest/gallery/default.aspx
Thanks DWS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top