Monday, 31 August 2015

J query message popup in dot net using c#

Code For design page(Aspx/ascx):-

here you need to import the JS and css code from google you can easily get.

Click below link and download jS and CSS:-

Download JS and CSS links from here

<%--popup--%>
<script src="../_layouts/15/Yourfoldername/popup/jquery.min.js"></script>
<script src="../_layouts/15/yourfoldername/popup/Popup1.js"></script>
<link href="../_layouts/15/yourfoldername/popup/popupman.css" rel="stylesheet" />

<link href="../_layouts/15/yourfoldername/Style/webpartstyle.css" rel="stylesheet" />

<script type="text/javascript">
    function ShowPopup1(message) {
        $(function () {
            $("#dialog").html(message);
            $("#dialog").dialog({
                title: "Message",
                buttons: {
                    Close: function () {
                        $(this).dialog('close');
                    }
                },
                modal: true
            });
        });
    }
</script>

div for popup display:-

<div id="dialog" style="display: none">
</div>

C# code to call that popup into code:-

Page.ClientScript.RegisterStartupScript(this.GetType(), "Popup", "ShowPopup1('RFP Has Been Created Successfully.');", true);



Thank You,
Manish k Pandey