How to add a simple marker to map from XY coordinates?

Discussion created by jchamberlain-dupree on May 23, 2011
Latest reply on Aug 10, 2012 by prueger
I am trying to integrate an esri map into our companies webpage as part of a proof oc concept for a future project.

I am trying to add a simple marker to a map using the XY coordinate we have stored in a DB. Most of the information I have found relates to SilverLight, VB. I am using C# in vs 2005. Can someone point me in the right direction as to how/where to get started?

I am a bit new to this technology (mapping, ARCGIS) so forgive my naivete in advance and please tell me any info I missing.

Here is the code I have for my basic map:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestBaseMap.aspx.cs" Inherits="OnDemand.Pages.TestBaseMap" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
    <script src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.3" type="text/javascript"></script>
    <link href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.3/js/dojo/dijit/themes/claro/claro.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    var map;
    function init() {
      map = new esri.Map("mapDiv");
      var basemapURL= "http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"
      var basemap = new esri.layers.ArcGISTiledMapServiceLayer(basemapURL);
    <form id="form1" runat="server">
    <div id="mapDiv" style="width:900px; height:600px; border:1px solid #000;"></div>

All I would like to be able to do is add a pin/marker to the map with a popup displaying the coordinate info.

Any suggestions would be appreciated.

Thank you very much.