home / software / tips and tricks / How can I use custom entities and classes in aspx pages (not on code behind)?

How can I use custom entities and classes in aspx pages (not on code behind)?

Updated:  03/02/2008 10:03 AM
Author:  Shiju Mathews

Status:    Resolved.


If you want to add code to the aspx page(not on cs page- Code behind), you need to add the namespace to the aspx page as follows.

@Import Namespace="System.Data" .

Consider you have a namespace called Entity. It contains a struct named EEvent. If you want to write code like %# ((EEvent)Container.DataItem).EventDescription % inside a DataReader, you must have to add the namespace as
@ Import Namespace ="Entity"
Tags: How can I use custom entities and classes in aspx pages (not on code behind)?
Updated on: October 2024