views:

821

answers:

5

Dear all;

I want to display an error message on my asp.net application. This message is a warning message, this is the way I did it:

CmdCalcInvoke.Attributes["onclick"] = "return confirm('Are you sure you want to calculate the certification? WARNING: If the quarter has not finished, all the partners status will change')";

The code above works fine. The CmdCalcInvoke is an htmlInputButton. This is the message that the message box displays;

Are you sure you want to calculate the certification? WARNING: If the quarter has not finished, all the partners status will change

What i want to do is to display this message, but wanted to highlight the WARNING word by making it bold, or displaying the word in red, can this be done???, can't remember seeing a message box with this characteristics, but I though i would ask in case

Any suggestions will be welcome Many thanks in advanced guys!!!!

+3  A: 

you can if you dont use the default alert boxes. Try using a javascript modal window which is just normal div markup that you can control the styling of. Look at blockui for jquery (there are loads of others)

redsquare
A: 

The modal dialog control I use is : http://foohack.com/tests/vertical-align/dialog.html http://foohack.com/2007/11/css-modal-dialog-that-works-right/

I find it works well across all browsers. I've hacked it round to work well with ASP .NET, and that was pretty easy.

RB
A: 

It isn't possible to apply formatting to a standard dialogue box. However if you really want to format it you could flash up the message in HTML either next to the button or as a absolutely placed div, which you could format with CSS.

A Nony Mouse
A: 

Else, use something like a LightBox based solution like Thickbox?

Adhip Gupta