Skip to Content
Apr 25, 2007 at 02:43 PM

Another Modification question :)


ok, my last post was about getting DisplayName from user table and get it into the datagrid.

now im trying something similar, im trying to get an extra column with the postalcode in the customers.ascx from the dashboard.

i have learned a lot from my last post and i know now what kind of methods and data is available in netpoint.dll

Since customers from the api isnt that complex compared to the accountsearch if tried the following code

<%@ Control Language="c#" AutoEventWireup="false" Codebehind="customers.ascx.cs" Inherits="netpoint.dashboard.controls.customers" TargetSchema=""%>

<%@ Page Language="C#" Inherits="netpoint.classes.NPBasePage" %>

<%@ Import Namespace = "netpoint.api.utility" %>

<%@ Import Namespace = "netpoint.api.account" %>

<%@ Import Namespace = "System.Data" %>

<script runat="server">

protected void Grid_ItemDataBound(object sender, DataGridItemEventArgs e)


NPBasePage page = (NPBasePage)this.Page;

DataRowView MyRow = (DataRowView)e.Item.DataItem;

if (myRow == null) return;

String PostalCode = address.PostalCode;

Literal literal4 = (Literal)e.Item.FindControl("ltlPostalCode");



<asp:datagrid id="grid" PageSize="50" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"

Width="100%" runat="server">

<ItemStyle CssClass="npadminbody"></ItemStyle>

<AlternatingItemStyle CssClass="npadminbodyalt"></AlternatingItemStyle>

<HeaderStyle CssClass="npadminsubheader"></HeaderStyle>


<asp:HyperLinkColumn DataTextField="AccountName" HeaderText="colName" SortExpression="AccountName" DataNavigateUrlField="AccountID"


<asp:TemplateColumn HeaderText="PostalCode" SortExpression="PostalCode">


<asp:Literal ID="ltlPostalCode" runat="server"></asp:Literal>



the rest of the code is not interresting since its not changing.

the problem is when i try to run this it gives the following error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The directive 'Page' is unknown.

Source Error:

Line 1: <%@ Control Language="c#" AutoEventWireup="false" Codebehind="customers.ascx.cs" Inherits="netpoint.dashboard.controls.customers" TargetSchema=""%>

***Line 2: <%@ Page Language="C#" Inherits="netpoint.classes.NPBasePage" %>**** error here

Line 3: <%@ Import Namespace = "netpoint.api.utility" %>

Line 4: <%@ Import Namespace = "netpoint.api.account" %>

so i was wondering if some of you guys give a look at it and could tell me what im doing wrong (or its not even possible )


Kind regards,

C. Oude Luttikhuis