在哪里放置模态对话框html重用它而不是放在每个页面上 [英] where to place modal dialog box html to reuse it instead of placing on every page

查看:51
本文介绍了在哪里放置模态对话框html重用它而不是放在每个页面上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用bootstrap 4.对话框(https://getbootstrap.com/docs/4.0 / components / modal /)。

I am using bootstrap 4. dialog box (https://getbootstrap.com/docs/4.0/components/modal/) .

要求:

我有多个自定义网页部件我在哪里想根据需要使用这些对话框/弹出框。

I have multiple custom web parts where I want to use these dialogue/popup box as per need.

问题:

我必须在我想要的每个页面上放置这个html 使用此消息框。

I have to place this html on every page where I want  to use this message box.

需要解决方案:

我应该将此html放置一次到哪里重用它就像我们创建".js"一样。文件只是多次添加对重用函数的引用而不是再次写老化

where should I place this html once to reuse it like we create ".js" file to just add reference to reuse functions multiple times instead of writing aging and again

示例:2我们在asp.net中使用自定义Web部件来重用控件.. 

example:2 we use custom web part in asp.net to reuse controls.. 

如何使用以上消息框进行重复使用

how can I do this with above message box for reusability

谢谢

推荐答案


您可以创建一个用户控件您可以在其他网站部分重复使用。

这是演示供您参考。

https://www.c-sharpcorner.com/article/creating-custom-user -control-templates-in-sharepoint-2013-using-visual-studio /  

https://docs.microsoft.com/en-us/visualstudio/sharepoint/creating-reusable -controls-for-web-parts-or-application-pages?view = vs-2017 

You could create an usercontrol so you could reuse it in other webparts.
Here is demo for your reference.
https://www.c-sharpcorner.com/article/creating-custom-user-control-templates-in-sharepoint-2013-using-visual-studio/  
https://docs.microsoft.com/en-us/visualstudio/sharepoint/creating-reusable-controls-for-web-parts-or-application-pages?view=vs-2017 

最好的问候,

Lee

Best Regards,
Lee


这篇关于在哪里放置模态对话框html重用它而不是放在每个页面上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆