Terry Olsen wrote:
I didn't choose "code in separate file" when creating a web page. So I have
to use the fully qualified object names because I can't figure out where, or
even if i can, put the Imports statement. Can anyone shed some light on
this? What are the limitations when you have the server-side code in the
aspx file?
Hi,
When you are using server side codes in aspx page , you can still use
the import statement but in a different way.
just put the import statement below you page declaration
<%@ Page Language="C#" %>
<%@ Import Namespace="MyPackage.MyNameSpace" %>
thats it...
But its better to use code behind file.
Code behind file is introduced to make your code more maintainable
and separating the code logic from the page helps enforce the MVC
pattern.
Thanks
Masudur
kaz Software Ltd.
www.kaz.com.bd