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:
- add 'using' statement specify dll "maps" belongs to
- fully namespace maps class
e.g. (bearing in mind not exact name of dll!)
@if(ispost) { @microsoft.web.helpers.maps.getgooglehtml(....
Comments
Post a Comment