Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

238
Visualizações
Can't load Esri or JavaScript after registering .ascx file in Web Forms

Then I have an ASP.NET Web Form page that is MyAddress.ASCX that shows my map:

<asp:Panel runat="server" ID="plnAddress" Visible="true">
    <div>
        <div id="search"></div>
        <div id="map">
        </div>
    </div>
</asp.Panel>

On initial page load I am referencing MyAddress.ASCX in on page load and all works well.

Then I click on a tab to check the same map on another location in the page and it loads that page but no map shows.

I tried to remove the first instance of map created and tried to only load it on the PostBack ( thinking am using ID) but it seems it only works when page is loaded initially and not after any postbacks are made.

Initially MyAddress.ascx is registered inside IndividualAddress.ASCX like so:

<%@ Register Src="../MyAddress.ascx" TagName="MyAddress" TagPrefix="uc1" %>

<uc1:MyAddress ID="myAddress" runat="server" ShowAdditionalDirections="True" DisplayAdditionalDirectionsTextArea="True" MaxAdditionalDirectionLength="255" ShowApn="True" ShowCountry="True" ShowExtendedFields="True" ShowLocationType="True"/>

and then IndividualAddress.ascx is registered inside IndividualInfo.ASCX it like so:

<%@ Register Src="IndividualAddress.ascx" TagName="IndividualAddress" TagPrefix="uc5" %>

<uc5:SubjectAddress ID="indivAddress" runat="server" Visible="true" />

I have tried to register the JavaScript on page load of IndividualAddress, and IndividualInfo but the javascript never triggers again.

  var key1 = Guid.NewGuid();
  var key2 = Guid.NewGuid();
  ScriptManager.RegisterClientScriptInclude(myAddress, ucAddress.GetType(), key1.ToString(), "/ArcGISinit.js");
  ScriptManager.RegisterClientScriptInclude(myAddress, ucAddress.GetType(), key2.ToString(), "/myEsriJavascript.js");

I also tried to register indivAddress didn't work.

I tried many ways to register it but the JavaScript file did not fire.

I was at one time able to load the script it shows in developer tool but it appears to run after the page is rendered so the script does not fire.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda