Is there a way to dim a web page when a Details View Control is visible?
I am familiar with sites that when a message box appears, the web page dims in brightness, to focus on the particular message. I am building a site with Microsoft Web Developer 2010. A A开发者_运维知识库SP.net site. I have a DetailsView control to edit records, and i would like it to be displayed in the center of the screen, on top of everything else, with everything else dimmed out, until it is closed.
Thank you for your help!You can use the Modal popup control from ajax and put your DetailsView control in the popup.
Have a look at the Modal Popup working example here http://www.asp.net/web-forms/overview/ajax-control-toolkit/modalpopup/launching-a-modal-popup-window-from-server-code-cs
Have a look at this implementation example using DetailsView & Modal Popup Control
My favorite way to do this is to let jQuery do the work, by putting the relevant code into a jQueryUI dialog.
You'll also need this answer, to make sure jQuery doesn't relocate your controls outside the FORM tag (and thus, make them invisible to the ViewState).
精彩评论