Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 19th, 2005, 11:42 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Copenhagen, , Denmark.
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default VS changes Inherits automatically in ASP.NET

When working with VS together with ASP.NET there is some interaction between the .aspx file and the code-behind. The class of the Page_Load method normally inherits from the the Page class, but I have put another class in between.
Code:
Class1 : Class2 : Page
My Page_Load method is in Class1. The problem is that VS keeps changing the Inherits attribute in the .aspx file to Class2. How can I prevent this behaviour? It is driving me crazy... that is, more crazy than currently.

Thanks, Jacob.
__________________
Danish audio books for download at http://www.lytenbog.dk (Danske lydbøger til download).
  #2 (permalink)  
Old December 1st, 2005, 02:39 PM
Friend of Wrox
 
Join Date: Jun 2004
Location: Chennai, Tamil Nadu, India.
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

C# doesnt allow multiple inheritance. didnt your page give a compile error?

Regards
Ganesh
  #3 (permalink)  
Old December 1st, 2005, 04:27 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Copenhagen, , Denmark.
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am quite aware that you cannot do multiple inherritence by specifying something like this...
Code:
public class MyClass : Base01, Base02, Base03
... as in other languages, but it is possible to do a chain of inherritence, which was what I tried to describe using my psudo notation.

Therefore, I have this chain of inherritence, and VS.NET keeps changing the value of the attribute on the aspx page telling which code-behind class to inherrit. I have solved the problem by making the aspx page readonly. It patches the problem, but I guess it doesn't solve it.

Thanks anyway,
Jacob.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing .doc file in asp automatically vishalres Classic ASP Professional 3 April 9th, 2007 05:56 PM
send email automatically with classic asp crmpicco Classic ASP Professional 6 July 4th, 2006 09:56 AM
select generated automatically with asp crmpicco Classic ASP Basics 1 July 7th, 2005 04:34 PM
Let ASP to be instlled automatically shailu Classic ASP Basics 0 July 5th, 2005 07:08 AM
ASP: automatically sending email report luxx Classic ASP Databases 1 January 12th, 2004 04:50 AM



All times are GMT -4. The time now is 10:55 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.