This is a migrated thread and some comments may be shown as answers.

End of line in Notification message

1 Answer 216 Views
Notification
This is a migrated thread and some comments may be shown as answers.
pharmadev
Top achievements
Rank 1
pharmadev asked on 04 Dec 2016, 04:48 PM

Hi,

 

My notification is

 @foreach (SLEmailMessage x in Model.Notifications)
                {
                    @:var
subject = '@x.Subject';
                    @:var
body = '@x.Body';
                           @: notification.show({ title: subject, message:
body }, "upload-success");
                                 }


        });

In my controller

Where @x.Body =  "Building = 101" + Environment.NewLine +
                             "Manager Name: " + "Ali Baba";

The Environment.NewLine is causing an error. How to add a "end on line" in the notification?

I tried to replace the "end on line" by the <br> tag within a paragraph and it dit not work

A quick answer will be greatly appreciated

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 07 Dec 2016, 09:56 AM

Hello,

You can use a separate field for the data that should be displayed on a new line and add the br element in the template.

Let me know if this approach is an option or you need to specify it when constructing the body of the message.

Regards,
Slav
Telerik by Progress
Telerik UI for ASP.NET MVC is ready for Visual Studio 2017 RC! Learn more.
Tags
Notification
Asked by
pharmadev
Top achievements
Rank 1
Answers by
Slav
Telerik team
Share this question
or