locked
How Include Javascript file on condition in Page_Load RRS feed

  • Question

  • In Page_Load

       if (!IsPostBack){

           if ( condition ){

               //  load javascript file like

              //  <script type="text/javascript" src = "https://File_AA.js"></script>

          }  

          else

          {

              //  <script type="text/javascript" src = "https://File_BB.js"></script>

         }

    }

    Based on a condition How can I load a specific Javascript file?

    TIA

    Steve4212

       

    • Moved by CoolDadTx Wednesday, July 22, 2020 6:00 PM ASP.NET related
    Wednesday, July 22, 2020 5:15 PM

All replies

  • Please post questions related to ASP.NET in the ASP.NET forums.

    Michael Taylor http://www.michaeltaylorp3.net

    Wednesday, July 22, 2020 6:00 PM