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

Can't get VS 2005 to recognize page class

In VS 2003, from a dynamically loaded user control, I could set a property
of the parent webform with the following line of code:

CType(Me.Page, SamplePage).TestProperty = "test"

However, in VS 2005, "SamplePage" doesn't show up in intellisense when
typing the line above and VS complains:

" Type 'SamplePage' is not defined. "

Any ideas why VS 2005 doesn't recognize SamplePage?

Thanks,
Ben
Nov 19 '05 #1
2 1121
in vs2003, all the code behind we built into 1 dll, so any code behind class
could reference any other codebehind public properties

in vs2005, the code behind are partial class build into the page dll, so
they cannot refernce each other. if you want this feature:

1) you build a base class in app_code dir giving it the public properties
you want to expose to other pages
2) have the aspx codebehind inherit from that class. now other pages can
reference this properties
-- bruce (sqlwork.com)
"Ben Amada" <be*@REpoMOweVErpick.com> wrote in message
news:uP**************@TK2MSFTNGP09.phx.gbl...
In VS 2003, from a dynamically loaded user control, I could set a property
of the parent webform with the following line of code:

CType(Me.Page, SamplePage).TestProperty = "test"

However, in VS 2005, "SamplePage" doesn't show up in intellisense when
typing the line above and VS complains:

" Type 'SamplePage' is not defined. "

Any ideas why VS 2005 doesn't recognize SamplePage?

Thanks,
Ben

Nov 19 '05 #2
Bruce Barker wrote:
in vs2003, all the code behind we built into 1 dll, so any code behind
class could reference any other codebehind public properties

in vs2005, the code behind are partial class build into the page dll, so
they cannot refernce each other. if you want this feature:

1) you build a base class in app_code dir giving it the public properties
you want to expose to other pages
2) have the aspx codebehind inherit from that class. now other pages can
reference this properties
-- bruce (sqlwork.com)


Thanks Bruce -- got it working per your instructions!

Ben
Nov 19 '05 #3

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

Similar topics

4
by: japh | last post by:
Vim is swell about turning standard varbiable types green - like: int myAge; double myIQ; or whatnot. But if I have a class Point and declare a Point: Point upperLeftCorner; Point...
0
by: Jim Heavey | last post by:
Hello, I am attempting to move an ASP.Net application from 2003 to 2005. I did not open the application up in 2005, but rather created a new application and moved all the components into the new...
6
by: Dariusz Tomon | last post by:
Hi How can I get url of page so taht I can pass it to string varaible. I have got several urls in my IIS under one folder. I want to have one default.aspx where code under it recognize which...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
5
by: blackdog | last post by:
I have installed Visual Studio 2005, on the CD show Visual Studio 2005 team suite with 3 disks. I used to use Visual studio .NET 2003 and I used command csc.exe to compile csharp program. but...
1
by: Rolf Welskes | last post by:
Hello, I set in the configuration file of the application: <system.web> <pages styleSheetTheme="E01_Theme01" /> ...... This works.
3
by: Rolf Welskes | last post by:
Hello, this is a hint only. If you make a custom control for example witch generates code <div......</div> and I put such a control in a page then in html-view of the aspx-file I could...
3
by: NewToNetworks | last post by:
Hi, hello, help! I am new to networking so please forgive me if this is a simple question. I have been at this for hours to no avail. I"m trying to network my Mac G5, running OSX 10.4.7 Tiger, a...
0
by: Ralf | last post by:
I have created a Cr .rpt file in VS 2005. I have a page with a CrystalReportViewer. I am trying to add attributes to the .rpt file but I cannot find anything to add. I go the 'Field Explorer',...
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: 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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...

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.