Import reference & Page directive

H

Horace

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_folder.class_folder.class_filename1
Imports Test_region_folder.class_folder.class_filename2
Imports Test_region_folder.class_folder.class_filename3

and the web page will contain :-

<%@ Page Language="vb" AutoEventWireup="false" validateRequest="false"
Codebehind="aspxfilename.aspx.vb"
Inherits="Test_region_folder.aspx_folder.aspx_filename"%>

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

Imports Prod_region_folder.class_folder.class_filename1
Imports Prod_region_folder.class_folder.class_filename2
Imports Prod_region_folder.class_folder.class_filename3

and

<%@ Page Language="vb" AutoEventWireup="false" validateRequest="false"
Codebehind="aspxfilename.aspx.vb"
Inherits="Prod_region_folder.aspx_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
 
C

Craig Deelsnyder

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_folder.class_folder.class_filename1
Imports Test_region_folder.class_folder.class_filename2
Imports Test_region_folder.class_folder.class_filename3

and the web page will contain :-

<%@ Page Language="vb" AutoEventWireup="false" validateRequest="false"
Codebehind="aspxfilename.aspx.vb"
Inherits="Test_region_folder.aspx_folder.aspx_filename"%>

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

Imports Prod_region_folder.class_folder.class_filename1
Imports Prod_region_folder.class_folder.class_filename2
Imports Prod_region_folder.class_folder.class_filename3

and

<%@ Page Language="vb" AutoEventWireup="false" validateRequest="false"
Codebehind="aspxfilename.aspx.vb"
Inherits="Prod_region_folder.aspx_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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top