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.