473,386 Members | 1,758 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Problem with inheritance of code behind page

I am using Visual Studio with code behind to build files within an
application. The name of the project is bsecsSql.

Everything works fine on the local computer when I use 'copy project'
to copy it to a folder and use an address such as :
http://cms2/bsecsloc/management/elec...teDetails.aspx

but when I upload it to an internet server and attempt to access a
page eg
http://www.bsecs.org.uk//management/...eDetails.aspx:

I get the message
""Could not load type 'bsecsSQL.candidateDetails" with the following
line outlined in red as an error line

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="candidateDetails.aspx.vb"
Inherits="bsecsSQL.candidateDetails" Trace="true" %>

This is presumably because the address after 'Inherits' is
"bsecsSQL.candidateDetails". However I cannot get the page to work if
I merely put in
inherits"candidateDetails".

My question is how can ,I within or outside Visual Studio 2003,
configure the 'inherits' property so that it will work with the URL
shown above as well as on the local machine?

Best wishes, John Morgan
Nov 18 '05 #1
3 1339
Hi,

Inherits set the name of the class that page compilation process use to
derive the class create from aspx declaration from. So Inherits got
nothing to do with path.

ASP.NET looks for this class in the DLL generate for pages code behind
classes. it looks like you didn't copy that DLL to the Bin directory. or
that classes use other assemblies that didn't load to the server.

HTH

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)52-8888377
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2
"John Morgan" <jf*@XXwoodlander.co.uk> wrote in message
news:lj********************************@4ax.com...
I am using Visual Studio with code behind to build files within an
application. The name of the project is bsecsSql.

Everything works fine on the local computer when I use 'copy project'
to copy it to a folder and use an address such as :
http://cms2/bsecsloc/management/elec...teDetails.aspx

but when I upload it to an internet server and attempt to access a
page eg
http://www.bsecs.org.uk//management/...eDetails.aspx:

I get the message
""Could not load type 'bsecsSQL.candidateDetails" with the following
line outlined in red as an error line

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="candidateDetails.aspx.vb"
Inherits="bsecsSQL.candidateDetails" Trace="true" %>

This is presumably because the address after 'Inherits' is
"bsecsSQL.candidateDetails". However I cannot get the page to work if
I merely put in
inherits"candidateDetails".

My question is how can ,I within or outside Visual Studio 2003,
configure the 'inherits' property so that it will work with the URL
shown above as well as on the local machine?


John, I bet it wouldn't work even on another machine on your LAN. I don't
think it's a problem with the URL.

Where is the assembly containing bsecsSQL.candidateDetails? Did you put it
into the bin directory of the target server?

If you add a reference for that assembly, I think Copy Project will copy it
to the right place for you.
--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #3

Thank you John and Natty for your help.

No, the bin directory was not in the bin directory of the target
server! Going on what you said I changed the location of the bin
directory from bsecs/management/ to bsecs/ , the target server and
this got things working together with moving global.asax into the root
bsecs folder.

I then decided to delete the'management' folder and copy the files
and folders of the project directly into the root bsecs folder and
this works OK.

However I think what I should have done is to add a reference in the
project properties as John was suggesting and I could then have used
my original folder configuration.

I really do appreciate the help I get from this forum,

Best wishes, John Morgan
On Mon, 14 Jun 2004 23:47:46 +0100, John Morgan
<jf*@XXwoodlander.co.uk> wrote:
I am using Visual Studio with code behind to build files within an
application. The name of the project is bsecsSql.

Everything works fine on the local computer when I use 'copy project'
to copy it to a folder and use an address such as :
http://cms2/bsecsloc/management/elec...teDetails.aspx

but when I upload it to an internet server and attempt to access a
page eg
http://www.bsecs.org.uk//management/...eDetails.aspx:

I get the message
""Could not load type 'bsecsSQL.candidateDetails" with the following
line outlined in red as an error line

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="candidateDetails.aspx.vb"
Inherits="bsecsSQL.candidateDetails" Trace="true" %>

This is presumably because the address after 'Inherits' is
"bsecsSQL.candidateDetails". However I cannot get the page to work if
I merely put in
inherits"candidateDetails".

My question is how can ,I within or outside Visual Studio 2003,
configure the 'inherits' property so that it will work with the URL
shown above as well as on the local machine?

Best wishes, John Morgan


Nov 18 '05 #4

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

Similar topics

5
by: | last post by:
Hi, I'm trying to use the cookie munging session handling behaviour of asp.net instead of cookies themselves as I'm finding quite a few people are barring cookies (especially AOL users). If I...
0
by: Dan | last post by:
I posted a similar post regarding problems with VS.NET design mode. I fixed that problem (with much thanks to this newsgroup) but now I have a second problem. I have created a class called...
5
by: Invalidlastname | last post by:
Hi, I just read the pattern "Design and Implementation Guidelines for Web Clients" from MSDN. Here is my question. In chapter 3,...
3
by: Dan | last post by:
Hi, I have a problem using an aspx page with a Control on it. I get the following error message Compiler Error Message: CS1595: 'Test.Class2' is defined in multiple places; using definition...
1
by: Craig Street | last post by:
Hi How do i create a base page in ASP.NET 2.0? I don't want to use master pages as I don't need any visual inheritance. You could do this simply in ASP.NET 1.1 by creating a base page that...
1
by: Mark | last post by:
In version 1.1, I've got numerous code behinds that inherit from a class we've developed that inherits from the the Page class. How will this work in Whidbey? With partial classes used for code...
3
by: Jim Heavey | last post by:
Hello, my company has a standard format that I must follow when creating a page. The top portion of the page contains a standard heading which should be placed on each page. This "heading" has a...
3
by: Eugene | last post by:
I'm trying to write a class which uses BinaryWriter as its base but allows for queuing of write requests Public Class QueuedBinaryWriter Inherits BinaryWriter I override all the Write methods...
1
by: bill | last post by:
What's up with inheritance in code behind? Is it reliable, or should I skip it and forget about using inheritance in web forms until they get it right? I'm using VB.NET 2005 I have a web form...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...

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.