Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
I have two modelpop in 1 Child page's content place holder. and i have write the java script for close modelpop in Header content placeholder. But it...
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
 
    <script type="text/javascript" language="javascript">
        function closePopup() {
            $find('ctl00_ContentPlaceHolder1_ModalPopupExtender1').hide();
            // $find('ContentPlaceHolder1_ModalPopupExtender1').hide();

            //var phn = document.getElementById('ctl00_ContentPlaceHolder1_txtAdmisnNo');
            //document.getElementById('ctl00_ContentPlaceHolder1_txtAdmisnNo').value = "";
            document.getElementById('ContentPlaceHolder1_ModalPopupExtender1').value = "";
        }
        //        function showPopup() {
        //            $find('ctl00_ContentPlaceHolder1_ModalPopupExtender1').hide();
        //        }
        function closePopup1() {
            $find('ctl00_ContentPlaceHolder1_ModalPopupExtender2').hide();
            // $find('ContentPlaceHolder1_ModalPopupExtender1').hide();

            //var phn = document.getElementById('ctl00_ContentPlaceHolder1_txtAdmisnNo');
            //document.getElementById('ctl00_ContentPlaceHolder1_txtAdmisnNo').value = "";
            document.getElementById('ContentPlaceHolder1_ModalPopupExtender2').value = "";
        }
    </script>
Posted 25-Nov-12 18:25pm
Edited 25-Nov-12 22:27pm
DaveAuld167.1K
v2
Comments
Dinesh Ambaliya at 26-Nov-12 6:49am
   
Use ModelPopUpBehavior and close it using JS.

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 389
1 Nirav Prabtani 268
2 Richard Deeming 250
3 _Amy 185
4 CHill60 170
0 OriginalGriff 8,104
1 Sergey Alexandrovich Kryukov 7,067
2 Maciej Los 4,039
3 Peter Leow 3,738
4 CHill60 2,912


Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 26 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100