"MWells" <outbound__at_sygnal.com> wrote in message
news:ebu%231kP%...
> if not (ClientReader("achievements") is DBNull.Value) then
> achievements.text =
> ClientReader("achievements").ToString().replace(en vironment.newline,"<br>")
> end if
>
> -or-
>
> if not (ClientReader("achievements") is DBNull.Value) then
> achievements.text = ClientReader("achievements")
> achievements.text =
> achievements.text.ToString().replace(environment.n ewline,"<br>")
> end if
>
Thanks - that really helps,
Tom
>
>
> "tshad" <> wrote in message
> news:eRPirDP#...
>> "Mark Fitzpatrick" <> wrote in message
>> news:u2B6KjO%...
>> > Tom,
>> > Remember, line-breaks from a text box or text area are not the
> same
>> > thing as an HTML line break. Basically you'll need to replace the
> linefeed
>> > characters in the text box with the HTML <br>. This is a fairly
>> > straightforward operation using the Replace() method of the string
>> > functionality in .Net, such as
>> > varChar.ToString().Replace(Environment.NewLine,"<b r>")
>>
>> Does this replace all Newlines?
>>
>> Also, do I need to move the data to string or can I do it directly from
>> either my label control or data coming from my dataset, such as:
>>
>> if not (ClientReader("achievements") is DBNull.Value) then
>> achievements.text = ClientReader("achievements")
>> achievements.ToString().replace(environment.newlin e,"<br>") ->
>> doesn't seem to work here
>> end if
>>
>> or can I do it directly in the ClientReader line above?
>>
>> Thanks,
>>
>> Tom.
>>
>> >
>> > Hope this helps,
>> > Mark Fitzpatrick
>> > Microsoft MVP- FrontPage
>> >
>> > "tshad" <> wrote in message
>> > news:OQB39eO%...
>> >>I have a textbox that I am storing as text (or as a varChar). The
>> >>field
>> >>has multiple lines in it (not wrapped).
>> >>
>> >> When I read it back into a multiline textbox, it works fine. But when
> I
>> >> read it back into a label, it shows all lines together.
>> >>
>> >> Is there a way to get the Label to display the lines separately?
>> >>
>> >> I could use textbox and get rid of the border and set enable to false,
>> >> but then it greys the text, which I don't want.
>> >>
>> >> Thanks,
>> >>
>> >> Tom.
>> >>
>> >
>> >
>>
>>
>
>
|