Message box in Asp.NET C#
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",


More about “Message box in Asp.NET C#” related questions

Message box in Asp.NET C#

How to display a 1056 character message in message box in asp.NET C#. Response.Write("&lt;script&gt;alert(' " + a + " ')&lt;/script&gt;"); The above code just accepts 54 characters

Show Detail

what is message box in asp.net

what in asp.net similar to message box if (s != "null") MessageBox.Show("your in "); else MessageBox.Show("wrong user "); i want to replace message box here in c# code

Show Detail

ASP.NET Web Application Message Box

In an asp.net windows forms application, in the C# code behind you can use: MessageBox.Show("Here is my message"); Is there any equivalent in a asp.net web application? Can I call something from...

Show Detail

Need Dialog/Message Box component for C# ASP.NET

I would like to find a good-looking implementation of C# / ASP.NET message/simple dialog box. It should: be generated when I call something like showDialogBox() in my code, whenever I need to sho...

Show Detail

Best way of displaying a Message box or Confirmation box in ASP.NET

I came across requirement for message box like everyday since around a year now, I tried jQuery plugins, JavaScripts alert but am still not sure which way would be the best way of doing it. I want...

Show Detail

Display Success Message Box in ASP.NET C#

How can I display messagebox with success logo in ASP.net, I can only display alert message box by using these code. ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('Please dont

Show Detail

Custom message box in Asp.Net

I am trying to bring in a Custom message box functionality for an application developed using the DotnetNuke CMS.When i googled i came across this link source code in Java for message box display ...

Show Detail

How to show a message box in an ASP.NET page?

As I was a Windows programmer it was so easy to show a message box on a form. But on an ASP.NET page I don't know how can I show it? Actually I have some condition and based on that I want to sho...

Show Detail

message box in asp.net web application

how to display the 'successfully saved' message box in asp.net web application by using javascript. any idea ???

Show Detail

Message Box in C#

Using C# How to display a message box in C# I cannot find the message box in the dropdownlist.... How to display a message box in webpages...

Show Detail