views:

156

answers:

1

Hi Everyone,

I'm working on a piece of code at the moment that allows the user to enter values into fields. Once the user clicks on the 'save' button I am checking those fields against certain conditions (essentially calling a bunch of stored procedures to assess the values). If any of these 'rules' are met, I need to generate a popup that informs the user that certain values need to be fixed before they can continue for some of the conditions, and for others just to inform them of what conditions may need their attention.

The main thing I need help with is, how do I generate a popup box in my codebehind if the conditions are met?

A: 

While not a true popup, one option would be to use a CustomValidator to accomplish this along with the AJAX ModalPopupExtender. Server side you can do whatever you need to test validation rules and display a message to the user. I personally would prefer this over a popup window.

http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ModalPopup/ModalPopup.aspx

The following article hits on this in more depth:

http://ashishware.com/ASPValid.shtml

Jakkwylde
Awesome, thanks tons that's exactly what I am after.
Ryan French