tags:

views:

524

answers:

3

Hi,

I am building a Web Application using asp.net (C#). I come from windows forms development and find myself in a hard spot. Im making an application where the user should edit some simple information about himself, and thus i need to create a new dialog. How do I do that in asp.net? I have a button which event is handled serverside, and when i click lthis button i want to popup a dialog where i can show my custom web control (or any web control, lets make it generic from the start). How do I go about with doing so?

I got some part of the way by looking at the internet, that i need to make a section and set the z-index to 1000, but how do i make it visible (block)? Please help here as i am completely lost...

/H4mm3rHead

A: 

Hi,

I used to do the following: 1. my new pop up is just a new aspx page like any other page 2. add a button (or just a link) that fires a client side java script function 3. in the function I use window.open and put params to open my popup page with no toolbars or scrollbars and proper size to its content

check this for more info on #3

essamSALAH
+1  A: 

If you're not concerned about using a library, try Microsoft ASP.NET AJAX Control Toolkit, they have several controls that can create something you want (the ModalPopup control).

Adrian Godong
I second the ModalPopup control. It brings a nice feel to the page, forcing a decision before being able to modify any more data.
Erik Ahlswede
+1  A: 

The AJAX Control Toolkit has a ConfirmButton extender which will do exactly what you are looking for.

Babak Naffas