views:

179

answers:

3

Hi,

I've a label in an asp.net page that gets its text from a global resource file somthing like this:

<asp:Label  ID="Label1" runat="server" Text="<%$ Resources:MyResource, MyString %>" />

The resource string for MyString contains text with a linebreak like:

line1

line2

When the label is rendered I get the following html

<span id="Label1">line1line2</span>

but instead I want it to be rendered as

<span id="Label1">line1<br/>line2</span>

Is there a standard way making this happen without putting br-Tags in the resource file or manually replacing text in the resource string?

+1  A: 

The standard way is to put <br /> tags in the text.

Deniz Dogan
as I said I don't want to put br-Tags in the resource strings
MarioH
Then it is not possible.
Deniz Dogan
+1  A: 

Resources are just plain text, you'll have to post-process them after pulling the data from the resource file to change newlines to <br/>'s.

Jan Jongboom
A: 

but i want to display the space as i put in the english paragraph.same spaces i want to in converted hindi paragraph from resx file. what should i do??????

plz answer .

rucha rachana