母版页上的模式 [英] Modals on the MasterPage
问题描述
大家好,
这是我的问题,我有一个带VB背骨的ASP.NET 4应用程序,正在使用MasterPage.
我想要做的是在MasterPage上有一个按钮,该按钮会触发一个模式以在应用程序中打开的任何页面上打开.
我认为这就像将一个模态添加到MasterPage并使用modal.Show()在标题中放置一个按钮一样容易,令人讨厌的是,这似乎不起作用.
我真的很乐意开始对此进行介绍,欢迎您提出任何提示.
谢谢,
Caz
Hi All,
Here is my issue, I have a ASP.NET 4 App with VB back bone and am using a MasterPage.
What I am wanting to do is have a button on the MasterPage that triggers a modal to open on any page that is open in the application.
I thought it would be as easy as adding a modal to the MasterPage and putting a button in the header with modal.Show() annoyingly it seems that this did not work.
I would really appreciate a direction to start walking in on this, any tips are welcome.
Thanks,
Caz
推荐答案
嗨Caz,
据我所知,asp.net中没有这种模态概念!您可以在客户端(而非服务器端)通过Javascript显示模式.
U意味着在打开的任何页面上打开"是什么?
如果您在不同的选项卡,页面或浏览器中表示不同的页面,那么基本上就不容易做到. (有可能,但是您需要编写客户端脚本并进行一些服务器端编程)
一个方法可能是在每个页面中轮询服务器,如果在服务器端设置了某项设置,则在页面上显示一个对话框.
Hi Caz,
As I know there is no such a concept for modal in asp.net! you can show a modal via Javascript in client side but not in server side.
What do U "mean by to open on any page that is open"?
If you mean diffirent page in different tab, page or browser, basically you can not do it easily. ( it is possible but you need to write client side script and do some server side programming)
one approch might be poling server in every page and if a certain thing is set on your server side, show a dialog on your page.
这篇关于母版页上的模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!