c# - The name 'Maps' does not exist in the current context error using google maps in asp.net -


i trying integrate google map in asp.net application, following error:

the name " 'maps' not exist in current context "

here code:

@{     viewbag.title = "map"; }  <!doctype html> <html lang="en"> <head>   <title>map address</title>   <script src="~/scripts/jquery-1.6.4.min.js" type="text/javascript"></script> </head>  <body>     <h1>map address</h1>     <form method="post">         <fieldset>           <div>             <label for="address">address:</label>             <input style="width: 300px" type="text" name="address" value="@request["england"]"/>             <input type="submit" value="map it!" />            </div>         </fieldset>     </form>     @if(ispost) {         @maps.getgooglehtml(request.form["england"],             width: "400",             height: "400")     } </body> </html> 

you need either:

  1. add 'using' statement specify dll "maps" belongs to
  2. fully namespace maps class

e.g. (bearing in mind not exact name of dll!)

@if(ispost) {     @microsoft.web.helpers.maps.getgooglehtml(.... 

Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -