Sandeep Pathak
Sandeep Pathak

Reputation: 10747

How to include formatting in a string?

I need to create string in the following form :-

Contains (1) 11.35kg package of Chips Carob-Malt Sweet Non-Dairy.

Product features:

-New

-Organic

As you see, the string I want contains a few bold substrings, underlined strings as well as newlines (as shown).

Please suggest some way of doing this.

I just want to save many strings in the above format to a .csv file and upload them straight away from .csv file to the website where they will be displayed.

Upvotes: 0

Views: 2090

Answers (5)

Kiran Bheemarti
Kiran Bheemarti

Reputation: 1459

If it is a web app try http://ckeditor.com/

Upvotes: 0

kenny
kenny

Reputation: 22334

string.Format("Contains <b>({0}) {1:0.00}kg<b> package...")

or something close to that...

Upvotes: 2

Daniel Renshaw
Daniel Renshaw

Reputation: 34177

If you are using off-the-shelf shopping-cart software then you need to look into the documentation for that software to determine whether you are able to affect the display of the content. If you can change the formatting it is most likely achieved via some kind of templating system separately from the data import mechanism.

Upvotes: 1

alex
alex

Reputation: 1278

I would suggest you to save the bold parts between [b] and [/b] like MSN Plus! does. Than your website has to display these parts bold, [u] parts undelined and so on.
There is no other way of saving formatting in a string then using some kind of markup.

Upvotes: 1

Related Questions