Creating a popup page in dnn 5
-
19-06-2021 - |
Question
I have created a user control(.ascx file) in DNN 5 , I want to open that user control as a popup page. Or in other words ,My asp.net application is using DNN 5, I want to create a popup in my application on the click of a button. Help would be appreciated
Solution
you can wrap your control in a div and then use some jQuery to make it popup when you click a a link.
<div id="popupDiv" style="display:none;"> your control here </div>
<a id="popupLink" href="#"> Popup text </a>
<script type="text/javascript">
$(document).ready(function () {
jQuery("#popupLink").click(function (event) {
event.preventDefault();
jQuery("#popupDiv").fadeIn("slow");
});
</script>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow