Solved

'Grayed out' screen effect with ASP.NET, C#

Posted on 2008-06-17
6
1,759 Views
Last Modified: 2010-04-21
I have a page with various bits of information displayed from a database. When a user clicks on one of the pieces of data, I'd like to display a box allowing them to select a new value for that field, with an effect similar to a pop-up window, without actually popping up a new window. How would I go about graying out the existing page (semi-transparently) and displaying a box with new value choices in it, and then removing the grayed out effect after the 'popup' layer closes?

If someone has sample code that would be most useful, but any tips would be great.

Using VS 2008, C#, ASP.NET.
0
Comment
Question by:jimstar
  • 2
  • 2
  • 2
6 Comments
 
LVL 43

Expert Comment

by:TimCottee
ID: 21803113
Hello jimstar,

Have a look at the window control from obout: http://obout.com/window

Whilst you could do all this yourself, this is a nice cross-browser control that makes life easy.

Regards,

TimCottee
0
 
LVL 33

Accepted Solution

by:
raterus earned 300 total points
ID: 21803270
There is also a free control, "ModalPopup" in the ASP.Net AJAX Control Toolkit that does this:

http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ModalPopup/ModalPopup.aspx
0
 
LVL 4

Author Comment

by:jimstar
ID: 21803455
Hi TimCottee, thanks for the response. I do like the control, but it doesn't appear to disable/gray out the background page - users can still interact with the page. Perhaps I'm missing an option though.

Raterus, thanks also for your reply. I've been confused about the AJAX library on that site... if I am using VS 2008 (which has built-in AJAX support and controls) plus .NET framework 3.5, doesn't that supersede the control toolkit on that site? There's not a good explanation of how their control toolkit works with, or is superseded by, the various frameworks. Any help understanding this would be great.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 43

Assisted Solution

by:TimCottee
TimCottee earned 200 total points
ID: 21803568
jimstar,

You need to look at the Dialog bit rather than the straight window. http://www.obout.com/window/example_Dialog_clientupdate.aspx for example.

TimCottee
0
 
LVL 33

Expert Comment

by:raterus
ID: 21803681
The control toolkit can work along side of the built-in functionality, you can mix elements in a page if you needed to.  You actually don't need to worry about how the built-in features work to work with this, just follow the example in the toolkit.
0
 
LVL 4

Author Closing Comment

by:jimstar
ID: 31467953
Both solutions were perfectly good; for my purposes the MS control was a little better. 200/300 split. Thanks.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This video discusses moving either the default database or any database to a new volume.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now