views:

200

answers:

2

Hi, I have a progress bar (which is a user control). When user, click a button, this progressbar will get displayed. The issue is ...even if the progressbar is visible, I am able to set focus to other controls in base page. I need to blur the base page...and set focus to user control.

Plz help me ...Thanks in advance...!

+1  A: 

The latest version of the ASP.Net AJAX toolkit has a ModalPopup which takes care of this behaviour for you - just set the PopupControlID of the Modal Popup Extender to the ID of your control and the TargetControlId to the button which will trigger the popup.

Dexter
I know abt modal popup extender...Is ther no other way ?
Anish Mohan
Using a ModalPopupExtender is definitely going to be the easiest way in .Net. If you wanted, I guess you could re-implement the functionality of the extender - all it does it inject a new div set to take up 100% of the screen, and then set the z-index of the popup: `<div id="ctl00_SampleContent_backgroundElement" style="position: fixed; left: 0px; top: 0px; z-index: 10000; width: 1263px; height: 1688px; " class="modalBackground"></div><div id="ctl00_SampleContent_foregroundElement" style="z-index: 100001; position: absolute; left: 500.5px; top: 494.5px; "> ... </div>`
Dexter
It doesn't have to be the modal popup extender, but that approach is the best way to do it.
Brian
A: 

But how to avoid cancel button in popup extender ?

Anish Mohan