Hi,
If you are doing the same from server side, i think better way should be.
1. Put a div tag in the web page
<div runat="server" id="divMessage"></div>
2. Assign the value from from server side ; replace the comma character with as shown below.
divMessage.InnerHtml = Convert.ToString("Hello Mr.XXX,Welcome to My Company,You Have successfully Login,Regards,xxx").Replace(",", "</br>");
So no need to split and it should work.
Hope it works.