473,385 Members | 1,919 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,385 software developers and data experts.

Trying to Use Class

I am trying to work through an ASP.NET book and in one example you build a
Class and then call a method from that class in an ASPX page. I put the
class file ("quote.dll") in the bin directory and then added the aspx page
that uses it to the project. When I re-open the project and right click on
the aspx file and select the "Add to Project" option I get an error stating:
"There is no class file associated with the WebForm 'ShowQuote.aspx'. Create
a new class file now?" I can see the class file in the bin directory and
I've verified that the namespaces match?

How can I debug/correct this condition? Is there some place I "associate" a
class file to an aspx page?

TIA

Wayne.
Nov 18 '05 #1
4 1557
Hi Wayne,

The class that Visual Studio.Net is referring to is the CodeBehind class.
VS.Net is designed to compile ASP.net apps, which entials using CodeBehind
files that are separate from the .aspx Page Templates. It sounds like you're
working on an ASP.Net Page that includes the CodeBehind code IN the page
file. The message is NOT referring to your other custom class, which is not
a Page class.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Wayne Wengert" <wa***************@wengert.com> wrote in message
news:#W**************@TK2MSFTNGP10.phx.gbl...
I am trying to work through an ASP.NET book and in one example you build a
Class and then call a method from that class in an ASPX page. I put the
class file ("quote.dll") in the bin directory and then added the aspx page
that uses it to the project. When I re-open the project and right click on
the aspx file and select the "Add to Project" option I get an error stating: "There is no class file associated with the WebForm 'ShowQuote.aspx'. Create a new class file now?" I can see the class file in the bin directory and
I've verified that the namespaces match?

How can I debug/correct this condition? Is there some place I "associate" a class file to an aspx page?

TIA

Wayne.

Nov 18 '05 #2
Thanks for the response Kevin.

VSNET creates two files in the Bin directory; myProj.dll and myProj.pdb when
I import the aspx file. If I delete those files, they get recreated when I
build the project?

Wayne
"Kevin Spencer" <uc*@ftc.gov> wrote in message
news:OF**************@TK2MSFTNGP12.phx.gbl...
Hi Wayne,

The class that Visual Studio.Net is referring to is the CodeBehind class.
VS.Net is designed to compile ASP.net apps, which entials using CodeBehind
files that are separate from the .aspx Page Templates. It sounds like you're working on an ASP.Net Page that includes the CodeBehind code IN the page
file. The message is NOT referring to your other custom class, which is not a Page class.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Wayne Wengert" <wa***************@wengert.com> wrote in message
news:#W**************@TK2MSFTNGP10.phx.gbl...
I am trying to work through an ASP.NET book and in one example you build a Class and then call a method from that class in an ASPX page. I put the
class file ("quote.dll") in the bin directory and then added the aspx page that uses it to the project. When I re-open the project and right click on the aspx file and select the "Add to Project" option I get an error stating:
"There is no class file associated with the WebForm 'ShowQuote.aspx'.

Create
a new class file now?" I can see the class file in the bin directory and I've verified that the namespaces match?

How can I debug/correct this condition? Is there some place I

"associate" a
class file to an aspx page?

TIA

Wayne.


Nov 18 '05 #3
When Visual Studio compiles your code, it creates a DLL with the class
definition(s) inside it, and the ASPX page uses that compiled class as its'
CodeBehind. The .pdb file is the debugging database for that assembly.
Visual Studio.Net will compile all of your CodeBehind files into this one
DLL, creating a single Class Library for your entire app.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Wayne Wengert" <wa***************@wengert.com> wrote in message
news:#7**************@TK2MSFTNGP09.phx.gbl...
Thanks for the response Kevin.

VSNET creates two files in the Bin directory; myProj.dll and myProj.pdb when I import the aspx file. If I delete those files, they get recreated when I
build the project?

Wayne
"Kevin Spencer" <uc*@ftc.gov> wrote in message
news:OF**************@TK2MSFTNGP12.phx.gbl...
Hi Wayne,

The class that Visual Studio.Net is referring to is the CodeBehind class.
VS.Net is designed to compile ASP.net apps, which entials using CodeBehind files that are separate from the .aspx Page Templates. It sounds like you're
working on an ASP.Net Page that includes the CodeBehind code IN the page
file. The message is NOT referring to your other custom class, which is

not
a Page class.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Wayne Wengert" <wa***************@wengert.com> wrote in message
news:#W**************@TK2MSFTNGP10.phx.gbl...
I am trying to work through an ASP.NET book and in one example you build a Class and then call a method from that class in an ASPX page. I put
the class file ("quote.dll") in the bin directory and then added the aspx
page that uses it to the project. When I re-open the project and right
click on the aspx file and select the "Add to Project" option I get an error

stating:
"There is no class file associated with the WebForm 'ShowQuote.aspx'.

Create
a new class file now?" I can see the class file in the bin directory and I've verified that the namespaces match?

How can I debug/correct this condition? Is there some place I

"associate"
a
class file to an aspx page?

TIA

Wayne.



Nov 18 '05 #4
Kevin;

Thanks. I'll do some more digging to see if I can figure out what is going
on.

Wayne

"Kevin Spencer" <uc*@ftc.gov> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
When Visual Studio compiles your code, it creates a DLL with the class
definition(s) inside it, and the ASPX page uses that compiled class as its' CodeBehind. The .pdb file is the debugging database for that assembly.
Visual Studio.Net will compile all of your CodeBehind files into this one
DLL, creating a single Class Library for your entire app.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Wayne Wengert" <wa***************@wengert.com> wrote in message
news:#7**************@TK2MSFTNGP09.phx.gbl...
Thanks for the response Kevin.

VSNET creates two files in the Bin directory; myProj.dll and myProj.pdb

when
I import the aspx file. If I delete those files, they get recreated when I
build the project?

Wayne
"Kevin Spencer" <uc*@ftc.gov> wrote in message
news:OF**************@TK2MSFTNGP12.phx.gbl...
Hi Wayne,

The class that Visual Studio.Net is referring to is the CodeBehind class. VS.Net is designed to compile ASP.net apps, which entials using CodeBehind files that are separate from the .aspx Page Templates. It sounds like

you're
working on an ASP.Net Page that includes the CodeBehind code IN the page file. The message is NOT referring to your other custom class, which is not
a Page class.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Wayne Wengert" <wa***************@wengert.com> wrote in message
news:#W**************@TK2MSFTNGP10.phx.gbl...
> I am trying to work through an ASP.NET book and in one example you build
a
> Class and then call a method from that class in an ASPX page. I put the > class file ("quote.dll") in the bin directory and then added the

aspx page
> that uses it to the project. When I re-open the project and right click
on
> the aspx file and select the "Add to Project" option I get an error
stating:
> "There is no class file associated with the WebForm

'ShowQuote.aspx'. Create
> a new class file now?" I can see the class file in the bin

directory and
> I've verified that the namespaces match?
>
> How can I debug/correct this condition? Is there some place I

"associate"
a
> class file to an aspx page?
>
> TIA
>
> Wayne.
>
>



Nov 18 '05 #5

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

Similar topics

2
by: Gill Bates | last post by:
I'm trying to login to a banking site (https://www.providentconnection.com) using vb.net. I've tried many variations of WebClient and HttpWebRequest; none of which I've got to work. My latest...
0
by: agriff98 | last post by:
I am trying to use some pre-packaged software utilities to write an application. I am trying to use a special package called FirstlogicDb. This is a class that has some virtual methods and some...
1
by: tuko | last post by:
Hello kind people. I have the classes "point", "curve", "surface", "region" as shown below. Every class has a member function that returns a list of pointers to objects that comprise the *this...
5
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As...
5
by: Learner | last post by:
Hello, Here is the code snippet I got strucked at. I am unable to convert the below line of code to its equavalent vb.net code. could some one please help me with this? static public...
5
by: timothy.pollard | last post by:
Hi I'm having a bit of bother trying to make a questionnaire do what I want it to. I have put it up on www.web-iq.co.uk/test.htm. Basically the user of the final form (when I've tarted it up)...
5
by: Mike Krell | last post by:
I'm running into problems trying to override __str__ on the path class from Jason Orendorff's path module (http://www.jorendorff.com/articles/python/path/src/path.py). My first attempt to do...
1
by: shady | last post by:
I am trying to create a a three column page with fixed size left and right columns and sretching middle one that uses left and right margins to give space to the left and right columns. It worked...
1
by: rsteph | last post by:
I've got some product information pages, with images and text, all setup within a table. I'm trying to add a small image in the upper right hand corner of the content div (where all the important...
0
by: rbukkara | last post by:
Hi, I have got the following error while trying to add a user in the LDAP Directory. javax.naming.NameNotFoundException: ; remaining name 'uid=vassila,ou=People,dc=cs,dc=uno,dc=edu' I have...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.