Modal MessageBox for ASP.NET without jQuery

Posted by Joe on Stack Overflow See other posts from Stack Overflow or by Joe
Published on 2010-03-13T07:53:28Z Indexed on 2010/03/13 7:55 UTC
Read the original article Hit count: 650

Filed under:

I have an assembly with custom ASP.NET server controls that is used in several, mostly in-house, ASP.NET 2.0 applications. The server controls use simple modal popup messageboxes, which are currently implemented using the javascript alert and confirm functions.

I want to release a new version of this assembly that uses a better solution for messageboxes, including support for Yes/No buttons.

The appearance would be something like a simplified version of the Ajax Control Toolkit ModalPopup extender (sample here).

My constraints are that this should be as easy as possible to integrate into existing ASP.NET 2.0 applications without introducing new dependencies: ideally just drop in a new version of the assembly, that contains all the javascript it needs as an embedded resource, and possibly a CSS file.

Because of this constraint, I am not considering solutions I've seen that use jquery, or the ASP.NET Ajax Control Toolkit, which appears to require adding elements to pages that use the extenders (ScriptManagers and the like).

Any recommendations?

© Stack Overflow or respective owner

Related posts about ASP.NET