Skip to content
Loading
  • Uttam Kumar
    +2
    1. <script type="text/javascript">  
    2.   
    3.     function openPopup() {  
    4.   
    5.             window.open("YOURpopuppage.aspx", "_blank", "WIDTH=1080,HEIGHT=790,scrollbars=no, menubar=no,resizable=yes,directories=no,location=no");    
    6.                  
    7.                 }  
    8. //
    9. //  
    10. script>  
    11.   
    12.    <asp:imagebutton id="btnpopup" runat="server" onclientclick="return openPopup()" xmlns:asp="#unknown" />  
    If you want to open from server side call c#
     

    1. btnpopup.Attributes.Add("onclick", "return openPopup();");  
     
    +2
  • +2
    Hi Uttam
     
      I have below code in c# side . I want Url should open in Modal Popup. In header it should appear Assign Students
     
    htmlTable.Append(" " + "");
     
     
    Thanks 
    +2
  • +2
    Hi Uttam
     
      Is it possible to open aspx page in Bootstrap Modal Popup
     
    Thanks 
    +2
  • Chris Love
    +2
    When I need a modal, I inject it as hidden HTML, usually in the bottom of my page, just before script tags.
    When it is needed I apply a CSS class that displays the element, overlayed on top of the primary content. I also like to place an opaque layer between the modal and the primary content.

    Since I tend to use Bootstrap I create a modal wrapper with the d-none class applied. When I need to display the modal I remove d-none and replace it with d-flex or d-block.

    You should also use position:absolute or position:fixed on your modal element.
    +2