473,804 Members | 3,822 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Import reference & Page directive

Hello

Does anyone know how to remove (or make more general) both the Imports
clause (in a class .vb file) and the Page directive (specifically the
Inherits clause in a web page .aspx file).

Because we have a test and production region both residing on the same
machine, each time I need to promote a change from test to production I have
to change both of these references.

For example in my test region the class file will contain :-

Imports Test_region_fol der.class_folde r.class_filenam e1
Imports Test_region_fol der.class_folde r.class_filenam e2
Imports Test_region_fol der.class_folde r.class_filenam e3

and the web page will contain :-

<%@ Page Language="vb" AutoEventWireup ="false" validateRequest ="false"
Codebehind="asp xfilename.aspx. vb"
Inherits="Test_ region_folder.a spx_folder.aspx _filename"%>

When I promote these to production I have to change these to :-

Imports Prod_region_fol der.class_folde r.class_filenam e1
Imports Prod_region_fol der.class_folde r.class_filenam e2
Imports Prod_region_fol der.class_folde r.class_filenam e3

and

<%@ Page Language="vb" AutoEventWireup ="false" validateRequest ="false"
Codebehind="asp xfilename.aspx. vb"
Inherits="Prod_ region_folder.a spx_folder.aspx _filename"%>

As mentioned I'd like to remove the region reference to make it completely
general so that I can put it into any region (as in time we will create a
development region as well).

Cheers
Phil
Nov 18 '05 #1
1 1694
On 7/27/2004 1:31 PM, Horace wrote:
Hello

Does anyone know how to remove (or make more general) both the Imports
clause (in a class .vb file) and the Page directive (specifically the
Inherits clause in a web page .aspx file).

Because we have a test and production region both residing on the same
machine, each time I need to promote a change from test to production I have
to change both of these references.

For example in my test region the class file will contain :-

Imports Test_region_fol der.class_folde r.class_filenam e1
Imports Test_region_fol der.class_folde r.class_filenam e2
Imports Test_region_fol der.class_folde r.class_filenam e3

and the web page will contain :-

<%@ Page Language="vb" AutoEventWireup ="false" validateRequest ="false"
Codebehind="asp xfilename.aspx. vb"
Inherits="Test_ region_folder.a spx_folder.aspx _filename"%>

When I promote these to production I have to change these to :-

Imports Prod_region_fol der.class_folde r.class_filenam e1
Imports Prod_region_fol der.class_folde r.class_filenam e2
Imports Prod_region_fol der.class_folde r.class_filenam e3

and

<%@ Page Language="vb" AutoEventWireup ="false" validateRequest ="false"
Codebehind="asp xfilename.aspx. vb"
Inherits="Prod_ region_folder.a spx_folder.aspx _filename"%>

As mentioned I'd like to remove the region reference to make it completely
general so that I can put it into any region (as in time we will create a
development region as well).

Cheers
Phil

normally your namespaces shouldn't need to be changed. I think this
ended up this way because vb likes to define its namespaces based on the
folder structure of the project.

I guess I don't know what the test and prod regions mean, why are there
different codebases for each? Usually your app should be able to just
be migrated from environment to environment with only web.config changes
(or other config changes) outside the code. Otherwise you're
recompiling and changing code, which from a QA standpoint, even tho it's
minor, is a no-no..

Perhaps if you can explain what this layout is for, we can tell you how
to get away from this process...

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2094
by: Dan Williams | last post by:
Hi people I've just joined the Python list and although I'm sure my question must be asked fairly frequently, I have been unable to find an answer after two days of searching. For the record, my total Python experience is also two days :) (I come from a C++ background though, so I have good programming knowledge in general). My question is thus: how do I reference a parent module and its children?
2
3378
by: s.hong | last post by:
Hello? On the ASP.NET, I can use the class by import declation on the top of page. <%@ page language="vb" explicit="true" aspcompat="false" debug="true"%> <%@ import namespace="System.Data" %> <%@ import namespace="System.Data.SqlClient" %> It's work well for the compiled class files in /bin folder.
4
6114
by: Bruce W. Roeser | last post by:
All, I'm reading a book by Charles Petzold (Programming VS.Net). Pretty good content but am confused about the difference. From the text: ---------------------------------------------------------------------------------------------------------------------------------------------------------- The @ Import Directive Next to @ Page, the directive that ASP.NET programmers use the most is @ Import. The @ Import directive is ASP.NET's...
5
2045
by: Sharon Tal | last post by:
Compiler Error Message: CS0234: The type or namespace name 'Http' does not exist in the class or namespace 'System.Runtime.Remoting.Channels' (are you missing an assembly reference?) Source Error: Line 2: <%@ Import Namespace="System.Runtime.Remoting" %> Line 3: <%@ Import Namespace="System.Runtime.Remoting.Channels" %> Line 4: <%@ Import Namespace="System.Runtime.Remoting.Channels.Http" %>
2
4064
by: Andy Fish | last post by:
Hi, I have a single-file aspx file (no codebehind). when I try to do this: <%@ Import Namespace="MySql.Data.MySqlClient" %> I get this: CS0246: The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?)
11
2118
by: Mark | last post by:
Hello I made a site with validated XHTML and CSS. It works fine also. Only in IE i see the site build up without CSS (very fast though) and then the CSS is used to build the page. When i use this it works fine: <link href="styles/site.css" rel="stylesheet" type="text/css" />
3
2346
by: Managed Code | last post by:
I have a BasePage class that derives from System.Web.UI.Page. All of my content pages derive from this. The derived page classes use the following MasterType declaration that follows to reference the master. <%@ MasterType TypeName="MyMasterPage" %> How do I reference the master page class from the BasePage? Thanks...
9
2857
by: rn5a | last post by:
Is putting a VB class file in the special directory named App_Code the same as relocating the VB class file from the App_Code directory to another directory & then using the VBC tool, compiling the VB class file into a DLL & putting the DLL in the bin directory? Though while running an ASP.NET app using either of the 2 approaches doesn't make any difference, Visual Web Developer 2005 Express Edition behaves erratically sometimes if the...
1
1301
by: Johnson545236 | last post by:
I need some serious help. I'm extremely new to vs 2003 .net and I have to work with CRM, sigh. I am trying my first program and I get this error: Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0246: The type or namespace name 'workingwithcrm' could not be found...
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10332
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10320
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9150
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7620
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4299
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2991
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.