最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

c# - Asp.Net: Javascript Modal Window - Stack Overflow

programmeradmin5浏览0评论

I would like to create a javascript modal pop up window to get some values from a user in a ASP.Net 2.0 webpage.

The basic idea is this. When a user clicks a button, a modal window will e up and ask 3 or 4 questions. The asp page will not be able to be changed while this window is up. Once the questions have been answered I need to grab the values from this window so the asp page has access to them and can handle them in the code behind.

Can I please get some examples on how you would implement this scenario.

I would like to create a javascript modal pop up window to get some values from a user in a ASP.Net 2.0 webpage.

The basic idea is this. When a user clicks a button, a modal window will e up and ask 3 or 4 questions. The asp page will not be able to be changed while this window is up. Once the questions have been answered I need to grab the values from this window so the asp page has access to them and can handle them in the code behind.

Can I please get some examples on how you would implement this scenario.

Share Improve this question asked Oct 17, 2008 at 0:28 Joshua HudsonJoshua Hudson 2,2172 gold badges21 silver badges24 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 5

Have you looked at the ModalPopupExtender?

http://www.asp/ajax/ajaxcontroltoolkit/samples/modalpopup/modalpopup.aspx

The easiest methods would be to either use ModalPopupExtender as mentioned by Jon or potentially use jQuery's thickbox or something similar as well.

Otherwise, you could roll your own JS to do it.

You could use the javascript function 'window.showModalDialog', but it only works in Internet Explorer.

You can pass in and return any number of variables by wrapping them up into an object.

发布评论

评论列表(0)

  1. 暂无评论