NickName:Niranjan Thangaiya Ask DateTime:2010-11-11T19:56:04 Message box in Asp.NET C# How to display a 1056 character message in message box in asp.NET C#. Response.Write("<script>alert(' " + a + " ')</script>"); The above code just accepts 54 characters only.I need some other way to display the error messages for a whole page. Copyright Notice:Content Author:「Niranjan Thangaiya」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.Link to original article:https://stackoverflow.com/questions/4154129/message-box-in-asp-net-c-sharp Answers rboarman 2010-11-11T12:02:45 I would use jQuery instead. It's a lot more friendly to the user than an alert and more flexible. There's a modal version if you need that as well.\n\nhttp://jqueryui.com/demos/dialog/", Stefan P. 2010-11-11T12:00:46 You can use the ModalPopup component from Ajax control toolkit.", Michael Gattuso 2010-11-11T12:04:13 I don't know the max limit of javascript alerts but it is certainly more than 54 chars. You may need to insert line breaks (\\n) to force the text over several lines. As others have mentioned though I would also look at alternatives to displaying this in the alert box.", anishMarokey 2010-11-11T12:10:23 you can try this in your codebehind.\n\nString csname1 = \"PopupScript\";\n\n String cstext1 = \"<script type=\\\"text/javascript\\\">\" +\n \"alert('ssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssdssssd');</\" + \"script>\";\n RegisterStartupScript(csname1, cstext1);\n",