Click here to Skip to main content
15,908,445 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to save textarea fill data break line mvc

I am trying to save data with <br /> replace of /n
but wile retrieving it i m not getting break line in Textarea

C#
@Html.TextAreaFor(model => model.ProductEntity.Nutrition.replace("<br />","/n"))
not working


[Edit member="Tadit"]
Corrected formatting and grammatical issues.
Added pre tags.
[/Edit]
Posted
v3

1 solution

You may want to use.

C#
@Html.TextAreaFor(model => model.ProductEntity.Nutrition.replace(Environment.NewLine, "<br/>"))
 
Share this answer
 
v2
Comments
Member-515487 4-Apr-14 8:37am    
Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900