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).Tes tProperty = "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 2 1137
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*@REpoMOweVE rpick.com> wrote in message
news:uP******** ******@TK2MSFTN GP09.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).Tes tProperty = "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
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 lowerRightCorner;
|
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 project. Granted, this was
probably not the way to go, but it did show me what has changed and I had to
do a little reasearch to resolve the errors.
There are a few remaining errors which I am currently stumpted and a few
question about what I...
|
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 url is used by user and
then display appropriate data to that url (one url is about fashion, other
about law and so on). By means of recognition of url I can display
appropriate banners for example.
|
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 the html page
controls the form fields that are required. It doesn't function like
it's supposed to and I can leave all the fields blank and it still
submits the form. Also I can't get it to transfer the file in the
upload section. The file name...
|
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 in Visual Studio 2005, I could not find csc.exe. Any tip??
Thanks
| |
by: Rolf Welskes |
last post by:
Hello,
I set in the configuration file of the application:
<system.web>
<pages styleSheetTheme="E01_Theme01" />
......
This works.
|
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 write
|
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 PC laptop running Windows 2000, and an HP Laserjet 4500, with a Linksys Wireless-G router. All are set up with network cords running to the router. The router is working since I can access the internet on both computers.
I followed the...
|
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', and
choose 'Database Fields'. I look under 'Project Data', and it shows
all my pages, but it doesn't recognize any of my data source's b/c I
do not find any table data. Nothing under any page. I did this in
previous versions when .NET used...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |