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

Inheritance w/ the Webform Editor

Dear all,

when we inherit an ASP.NET webform for from a base class, and have some of
the web controls defined there (the part which is usually contained within
the 'web form designer generated code' region), how can we tell VB not to
insert them in the aspx.vb file again, producing an obvious compiler warning
('should be declared "shadows"') and a runtime binding error everytime I open
the project and first start the debugger?

many thanks & regards
Daniel.
Nov 21 '05 #1
2 967
Daniel,

I think that is good behaviour, however maybe can you try to set them in
your control standard to invisible.

Cor
Nov 21 '05 #2
Cor,

thanks for the hint, i've tried that right now. the behavior does not
change, still - everytime we do a full build after the solution is first
opened, the "protected withevents... line" is added by the environment, and
underlined by syntax checking in one go :-)

an interesting detail might be that in subsequent debugging sessions, while
the solution is still open in the same instance of the IDE, the line is not
added.

the base class of the web forms i am talking about is a pure vb class,
multiply inherited from System.Web.UI.Page without a designer in the
background, thusly:
(it's a BIG project.)

Public Class ViewStatelessTemplate
Inherits System.Web.UI.Page

Public Class clsStandardPageBase
Inherits webcore.ViewStatelessTemplate

Public Class clsCfgDistreesBase
Inherits clsStandardPageBase

Public Class distree_fulfil_stat
Inherits clsCfgDistreesBase

the control is declared in clsCfgDistreesBase, like so:
Protected WithEvents cmdPrint As System.Web.UI.WebControls.Button

the unwanted duplicate is auto-generated in the final, distree_fulfil_stat,
like so:
Protected WithEvents cmdPrint As System.Web.UI.WebControls.Button
maybe that's something we'd rather avoid, a scenario not appreciated by
asp.net?

regards
daniel.

"Cor Ligthert" schrieb:
Daniel,

I think that is good behaviour, however maybe can you try to set them in
your control standard to invisible.

Cor

Nov 21 '05 #3

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

Similar topics

6
by: Phillip N Rounds | last post by:
I have a webform, from which I have to submit info to another site. Their instructions are to have a html form, with the following as the submit: <form method="post"...
0
by: Bita-kookoo | last post by:
I am having a problem with inheritance for my web solution. Here are the steps I took for a project within C#: -I first created a new class, descended from System.Web.UI.Page. For this...
1
by: Benny | last post by:
Hi Since there is no 'WebForm inheritance', what r the ways we could create a base template webform, which the other forms could use Thanks in advance Benn
4
by: Amil | last post by:
// there are 2 forms inheriting from EditorTemplate // ItemsEditor and CategoriesEditor public EditorTemplate CreateForm(string inheritedFormName) { // EditorTemplate editor; // makes editor in...
6
by: VR | last post by:
Hi, I read about Master Pages in ASP.Net 2.0 and after implementing some WinForms Visual Inheritance I tryed it with WebForms (let's say .aspx pages, my MasterPage does not have a form tag itself...
2
by: Dave | last post by:
Hi, this is a follow-up to an earlier question but I really haven't found a definitive answer in my search If I have a Base and Derived webform, I've found that the dervived Page_Load event...
5
by: Bart Schelkens | last post by:
Hi, I'm still using VB.NET 2002. I was wondering if I could do the following : I'm creating a web-application. Now I want to create a base-webform that contains the layout for all my pages....
0
by: DC Gringo | last post by:
I am trying to output simply DataGrid of a coutry listing on a web form via a business object and XML web service...I receive no errors but no table HTML either. (I know the service and business...
1
by: amolkasbekar | last post by:
Is it possible to define inheritance between complex types in schema definitions so that the derived has the base elements and extended elements but is order insensitive. I have seen how to do it...
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
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,...

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.