Saturday, March 24, 2012

object reference not set to an instance of an object

Thanks for response.
I am using GIS software(AspMap 4.0.2). There is a Map control in which we add maps.
when we drag that control from toolbox and drop that in my .aspx page it shows the error
"object reference not set to an instance of an object".

u can see html source of page
------------
<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %
<%@dotnet.itags.org. Register Assembly="AspMapNET" Namespace="AspMap.Web" TagPrefix="cc1" %
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<cc1:Map ID="map" runat="server" />
</div>
</form>
</body>
</html
------------

I did not know that AspMap was using GIS, I thought is was a simple Map Viewer. What version on the AspMap dlls are you using I did not know they had a 4.0.2 .NET dll!


Hi,

Based on your description, you encounter the "object reference not set to an instance of an object". But it needs to clarify which line occurs this error information, the error line on HTML-Code above or on code behind?

I downloaded the AspMap for .NET 4.0.2, and add the AspMapNET.dll and AspMapNETUtil.dll as references. Thus try as your codes above. It works fine for me.

In my opinion, you can create with a new website and run it again to see if the error appears.

There are serveral sample for you about AspMapNet: http://www.vdstech.com/

Hope this can help you.

0 comments:

Post a Comment