<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Arcgis Javascript Api for MVC in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-javascript-api-for-mvc/m-p/234345#M21830</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 1em;"&gt;Good day everyone. I recently started a project on MVC 5 and I am trying to use the javascript API from Arcgis. I used the API before in webforms in .aspx pages and just normal html and it worked as expected. I am now trying to use the same API in Razor views as i require other information to be posted from my Controllers. The question is i tried using the javascript references&lt;/P&gt;&lt;P style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 1em;"&gt;&lt;A href="https://js.arcgis.com/4.10/esri/css/main.css" rel="nofollow noreferrer" style="color: rgba(53, 141, 170, 0.8); border: 0px; font-weight: inherit; text-decoration: underline;"&gt;https://js.arcgis.com/4.10/esri/css/main.css&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 1em;"&gt;&lt;A href="https://js.arcgis.com/4.10" rel="nofollow noreferrer" style="color: rgba(53, 141, 170, 0.8); border: 0px; font-weight: inherit; text-decoration: underline;"&gt;https://js.arcgis.com/4.10&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 1em;"&gt;and the same code from the samples they provide for javascript but require() in the cshtml page return undefined, but on webpages (.aspx/.html) it returns the desired results. I just want to know am i missing something or is the javascript api not compatible with MVC razor pages.&lt;/P&gt;&lt;P style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 1em;"&gt;This is the sample code attached as it works in html and aspx. But returning undefined in cshtml.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Jan 2019 13:28:51 GMT</pubDate>
    <dc:creator>TiaanSteyn</dc:creator>
    <dc:date>2019-01-29T13:28:51Z</dc:date>
    <item>
      <title>Arcgis Javascript Api for MVC</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-javascript-api-for-mvc/m-p/234345#M21830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 1em;"&gt;Good day everyone. I recently started a project on MVC 5 and I am trying to use the javascript API from Arcgis. I used the API before in webforms in .aspx pages and just normal html and it worked as expected. I am now trying to use the same API in Razor views as i require other information to be posted from my Controllers. The question is i tried using the javascript references&lt;/P&gt;&lt;P style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 1em;"&gt;&lt;A href="https://js.arcgis.com/4.10/esri/css/main.css" rel="nofollow noreferrer" style="color: rgba(53, 141, 170, 0.8); border: 0px; font-weight: inherit; text-decoration: underline;"&gt;https://js.arcgis.com/4.10/esri/css/main.css&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 1em;"&gt;&lt;A href="https://js.arcgis.com/4.10" rel="nofollow noreferrer" style="color: rgba(53, 141, 170, 0.8); border: 0px; font-weight: inherit; text-decoration: underline;"&gt;https://js.arcgis.com/4.10&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 1em;"&gt;and the same code from the samples they provide for javascript but require() in the cshtml page return undefined, but on webpages (.aspx/.html) it returns the desired results. I just want to know am i missing something or is the javascript api not compatible with MVC razor pages.&lt;/P&gt;&lt;P style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 1em;"&gt;This is the sample code attached as it works in html and aspx. But returning undefined in cshtml.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2019 13:28:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-javascript-api-for-mvc/m-p/234345#M21830</guid>
      <dc:creator>TiaanSteyn</dc:creator>
      <dc:date>2019-01-29T13:28:51Z</dc:date>
    </item>
  </channel>
</rss>

