How to use ArcGIS into a ASP.Net based Web?

5639
3
Jump to solution
02-13-2019 02:15 AM
ArshMalik
New Contributor II

Hi,

I want to implement a GIS based three Tier application. I prefer ASP.Net with C# (MVC).  

Can anyone guide me how to start with?

I could not find any example where one can start ASP.Net (MVC). Or how to add ArcGIS maps into an ASP.Net web site. 

I have downloaded .Net runtime but it does not show any ArcsGIS map when I select ASP.Net C# Web mvc. It has some ArcGIS for Andorid, Iphone and Xamarin etc but not for ASP.net Web Application. Please guide. I am using VS 2017. and Windows 10

Tags (4)
Reply
0 Kudos
1 Solution

Accepted Solutions
ArshMalik
New Contributor II

Hi,

I have managed to start implementation using Javascript API. Just to help others this is how I did.

As MVC supports javascript, html and c# code in one file so you can use javascript API and html samples of ESRI from below web site.

ArcGIS API for JavaScript | ArcGIS for Developers (Latest) 

Steps:

1- Create a Controller and View. 

2- Add following references in your _Layout.cshtml

<link rel="stylesheet" href="https://esri.github.io/calcite-maps/dist/css/calcite-maps-bootstrap.min-v0.8.css">
<!-- Calcite Maps -->
<link rel="stylesheet" href="https://esri.github.io/calcite-maps/dist/css/calcite-maps-arcgis-4.x.min-v0.8.css">
<!-- ArcGIS JS 4 -->
<link rel="stylesheet" href="https://js.arcgis.com/4.10/esri/css/main.css">

3- Use example like below and copy code in your view. You need to skip/comment out the code in step 2.

Calcite Maps and Bootstrap | ArcGIS API for JavaScript 4.10 

4- Call view from your controller.

5- I personally separated the javascript, style sheet and html code in different files. Call them in view. Enjoy

View solution in original post

Reply
0 Kudos
3 Replies
EvonFranklin
New Contributor III

Create your MVC application as normal and import the SDK that you will be using for instance the Javascript API and continue to build out your application from there using the documents online as reference.

ArshMalik
New Contributor II

Hi,

I have managed to start implementation using Javascript API. Just to help others this is how I did.

As MVC supports javascript, html and c# code in one file so you can use javascript API and html samples of ESRI from below web site.

ArcGIS API for JavaScript | ArcGIS for Developers (Latest) 

Steps:

1- Create a Controller and View. 

2- Add following references in your _Layout.cshtml

<link rel="stylesheet" href="https://esri.github.io/calcite-maps/dist/css/calcite-maps-bootstrap.min-v0.8.css">
<!-- Calcite Maps -->
<link rel="stylesheet" href="https://esri.github.io/calcite-maps/dist/css/calcite-maps-arcgis-4.x.min-v0.8.css">
<!-- ArcGIS JS 4 -->
<link rel="stylesheet" href="https://js.arcgis.com/4.10/esri/css/main.css">

3- Use example like below and copy code in your view. You need to skip/comment out the code in step 2.

Calcite Maps and Bootstrap | ArcGIS API for JavaScript 4.10 

4- Call view from your controller.

5- I personally separated the javascript, style sheet and html code in different files. Call them in view. Enjoy

View solution in original post

Reply
0 Kudos
EvonFranklin
New Contributor III

Exactly, you are well on your way to completing your project. I am using the same platform for a project I am working on with MVC.