In this article, you learn to create a modal popup login
page. AJAX makes it easy to implement. With UpdatePanel, the page won’t post
back if login failed. By adding your own authentication logic, you can expand
this demo easily to real world application.
Reference
Polished Popups
http://www.aspnetpro.com/articles/2009/05/asp200905so_f/asp200905so_f.asp
This article only shows you how to create a modal popup
confirm dialog, not a login dialog. And the panel doesn’t set Style="display:
none"; the hidden panel is visible when first time loaded.