Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

237
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!