Friday 23 December 2011

How to write into New line in Java Script

        private void MyFunction()
        {
            string QuoteStatus = "Please enter values in Billing Information^Please enter values in Nature of Business^Please enter values in Policy/Liability Coverage^Please enter values in Additional Int^Please enter values in Property Details";
            string[] strError = QuoteStatus.Split('^');
            string strErr = "";

            for (int i = 0; i < strError.Length; i++)
            {
                strErr += strError[i] + "
\\n";
            }
            Response.Write("<script language='javascript'>alert('" + strErr +"');</script>");
        }


Output would be something like :

No comments:

Post a Comment