"Martin Eyles" <> wrote in message
news:...
> "Hitesh" <> wrote in message
> news
5A24E20-858E-45C2-8098-...
> > hey whereever required you can add new LiteralControl(" "),
> > new LiteralControl("<br/>")
> >
> > To have the formatted HTML.
>
> This didn't quite work, but just inserted a space or <br/> in the html.
But
> I managed to modify it to do what I want. I now do
>
> theGraph.Controls.Add(New LiteralControl(Chr(10)))
>
> which inserts a newline character in the HTML.
To make this neater when run several times, I have tried to split this into
two bits
At the top of the method I set up a literal control object object:-
//Set up a web control to insert a new line into the HTML code.
System.Web.UI.LiteralControl codeNewLine;
codeNewLine=new System.Web.UI.LiteralControl(((char)10).ToString() );
And at several points I insert this line to add the control to another
control:-
theGraph.Controls.Add(codeNewLine); //add a new line to the HTML code.
However, this only appears to work the very last time it is inserted.
Any Ideas?
Thankyou,
Martin
--
Martin Eyles