How do I build a popup dialog in asp.net

爱⌒轻易说出口 提交于 2019-12-02 07:03:37

问题


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


回答1:


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).




回答2:


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




回答3:


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



来源:https://stackoverflow.com/questions/1088918/how-do-i-build-a-popup-dialog-in-asp-net

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!