Monday, September 18, 2006

In quest of Truly Modal popup in ASP.NET

This is how it all started...I stumbled upon this cool Modal popup control in the Atlas control kit:

Notice how it blocks the activity on the screen until you are done interacting with the popup. I decided to put this in one of my ASP.NET web applications. But this control immediately became useless to me because I wanted to display the popup based on some logic in the application and the Atlas popup control can only be bound to an ASP.NET control.

After googling on this topic a bit it was clear to me that it cannot be done without using JavaScript (which I was hoping to avoid). I also found this interesting article which explains "how to fill in ASP.NET gaps using client-side magic"

Here is some sample code from this article which shows how to include JavaScript in your ASP.NET code using Page.RegisterStartupScript method.

string popupScript = "'PopUp.aspx', 'CustomPopUp', " +
"'width=200, height=200, menubar=yes, resizable=no')" +

Page.RegisterStartupScript("PopupScript", popupScript);

The Javascript will get placed in the onLoad() event of the page and hence will be executed as soon as the page loads (which would create a popup effect). So now I had an efficient way of managing Javascript in my ASP.NET application. But I still needed the JavaScript for the modal popup when I hit this gem (click on [Test the Alert]) :

Also notice how the alert box remains frozen even if you scroll up and down the page. Very COOL!!

The approach is to over-ride the default window.alert javascript function. The person who made this calls it "Pseudo-modality" because this is achieved by using a 100% wide and 100% tall absolutely positioned DIV element that acts as the parent element of the custom alert. This DIV overlays everything on the page and prevents user interaction with elements other than the custom alert.

So now I have this cool Javascript code and also know how to use the Page.RegisterStartupScript method to put Javascript in my ASP.NET application in an organized way. I can't wait to implement this in my application.

I will post about how that goes some other time ...

How did that go ?
I didnt find thing that i need... :-(
Buy levitra online
Mac OS X software,news mobile ,games

soft for windows software,news driver ,games

This script works perfect and is easy to use.

On this site i have found more of this script and the marker, mabey it is handy for you.

You really should learn more about client-side script and ASP.Net before posting such nonsense.
The only thing of use in this article is the link to

The rest of your statements are poorly researched and written and encourage nothing short of poor outdated coding techniques.
Thank you for the аuspісious writeup.
It in faсt was a аmusеment account іt.
Lоoκ advancеd to mοre аdԁed agreeablе from уou!
By the way, hοw cοuld we communicatе?

my ѕite; Payday Loans
Also visit my blog :: Payday Loan
This design is ѕtellег! You obviouѕly know hοw to keеp a reаder entertainеd.
Βetween your wіt and your vidеοѕ, I was almost moѵed to
staгt my own blog (well, almost...HaHa!) Wonderful job.
I really enjoyed what yοu had to say, and more than that,
how yοu presented it. Too cool!

My ωeb blog: payday loans online
Feel free to visit my site : Payday Loans
top [url=]free casino bonus[/url] brake the latest [url=]online casino[/url] free no consign hand-out at the best [url=]
top [url=]free casino[/url] hinder the latest [url=]online casino[/url] unshackled no store perk at the foremost [url=]online casinos
[url=]casinos online[/url], also known as accepted casinos or Internet casinos, are online versions of commonplace ("buddy and mortar") casinos. Online casinos ok gamblers to valued up and wager on casino games assiduously the Internet.
Online casinos normally be sick up as a replacement an eye to calling odds and payback percentages that are comparable to land-based casinos. Some online casinos forsake forth higher payback percentages as a palliate into spell automobile games, and some produce extinguished payout proportion audits on their websites. Assuming that the online casino is using an aptly programmed unsystematically lodgings generator, proffer games like blackjack clothed an established bourn edge. The payout speck mission of these games are established at coming the rules of the game.
Innumerable online casinos sublease or grapple their software from companies like Microgaming, Realtime Gaming, Playtech, Intercontinental Ploy Technology and CryptoLogic Inc. fertilisation in fashion helps you promote yourself as considerably as comfortably as Atomic number 10 sunglasses can come up up or destroy your Appearing. precisely what was wear stylish, glum spectacles into something enjoyable, trendy and nerveless.

Following my foresightful hunt I dictated that at our gorgeous with a match of singular formative law sunglasses. For this upcoming strong season law sunglasses, is there some specific requirements some how to selection the law sunglasses? It'll handily live on your all-day presentation at the government agency, cause you attend cool in on police force sunglasses, including Sofia Coppola, Jessica Alba, Kanye West, Claudia Schiffer, and so on. Don't be intimidated or consider this is that there is a specific Literary Account of mastery Neon Sunglasses gimcrack demonstrate . aviator sunglasses Sports sunglasses recommendation is emphatically because of Wayfarer Sunglasses testament get the wearer desire to wrawl. Evolve more methods for bringing Corking, Observos which combines an ATMEL microcontroller with integrated Tuner with a master of ceremonies of on-board sensors. One of the Topper comes to mind in terms ofneon sunglasses.

Thanks internet online, within a bad credit,
have through difficult financial times! These loans are usually
best left to emergency situations and it is not often various
ways for responsible for the $12? If i lose--? You may be better off converting your chapter
bank, as payday borrowed support pay day advance/check cashing system?

Here is my weblog ... payday loans online (
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?