473,480 Members | 1,957 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Cannot reference page classes

Hi

I'm using Beta 2, I haven't tried Beta 1 yet so I'm not sure if that's relevent.

Why can't I reference my WebForm classes?

For example I want to put a static method on a WebForm class so that I can pass an argument to it, however I can only reference certain classes in the ASP namespace.

Why is this? Sorry if I haven't explained too well.

--------------------------------
From: Kevin Lawrence

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>lGMkI1BrC0uR/JNOkA0MjQ==</Id>
Nov 19 '05 #1
1 1089
This isn't encouraged as it's probabaly not the right way to go about doing
whatever you're trying to do. If you want shared code to be used by many
pages, then you should factor that out into a seperate class. You can create
classes in the App_Code directory and those will automatically be compiled
for you in ASP.NET (and referenced) so you can use that common code by any
page.

What exactly are you trying to do in the common code that you want to put
in a ASPX file?

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi

I'm using Beta 2, I haven't tried Beta 1 yet so I'm not sure if that's
relevent.

Why can't I reference my WebForm classes?

For example I want to put a static method on a WebForm class so that I
can pass an argument to it, however I can only reference certain
classes in the ASP namespace.

Why is this? Sorry if I haven't explained too well.

--------------------------------
From: Kevin Lawrence
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>lGMkI1BrC0uR/JNOkA0MjQ==</Id>


Nov 19 '05 #2

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

Similar topics

8
5442
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
13
1635
by: Mtk | last post by:
Hi! Why does the following, simple, example produce such errors? I know it has to do with the two header files including each other and (moreover) the usage of the classes One and Two in the...
5
1731
by: Francis Shanahan | last post by:
Folks, I have a base page which is the grand-daddy of all my pages. It inherits from System.UI.Web.Page From this I inherit a layout page. From this I inherit the individual pages themselves....
4
1639
by: Keith Chadwick | last post by:
I am having some trouble referencing an Application("myVar") variable from within a module.vb file on my ASP.NET site. According to the documentation I should be able to reference...
5
4021
by: Alphonse Giambrone | last post by:
How can I reference a page or user control's properties (such as viewstate) and controls from another class? TIA -- Alphonse Giambrone Email: a-giam at customdatasolutions dot us
11
1285
by: Greg Smalter | last post by:
I'm converting some ASP web projects from VS 2003 to VS2005/ASP 2.0. The worst problem I've run into is all references (in codebehind CS files) to UserControls fail. I get the error "The type...
3
4195
by: Adam | last post by:
We have a web site that uses .vb for the web pages and .cs for a class module. We are getting the error in .NET 2.0 and VS 2005 beta 2. It does work with .NET 1.1. When trying to access a page...
8
1843
by: wASP | last post by:
Hi, I'm having a problem referencing the elements within an object after a method of that object (a member function) has been activated with an onsubmit handler: - - - - - - - - ...
68
4549
by: Jim Langston | last post by:
I remember there was a thread a while back that was talking about using the return value of a function as a reference where I had thought the reference would become invalidated because it was a...
0
6908
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
7044
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
7084
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...
0
6929
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5337
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,...
1
4779
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...
0
4481
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
181
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...

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.