codetoad.com
Home||ASP|ASP.Net|C++/C#|DHTML|HTML|Java|Javascript|Perl|VB|XML||CodeToadPlus!||Forums||RAM
Search Site:
Search Forums:
Web form inheritance problem? ipsoftware at 04:20 on Sunday, January 02, 2005

Hi All, suppose I have a common ASP.NET page named CommonPage.aspx which has several user controls (e.g. buttons), how may I create a inherited page which inherits the user controls from CommonPage.aspx, however together with its own other user controls (e.g. checkbox ,text box...). Inheritance is simple in Windows Form applications, however, it becomes unclear how I can do that in ASP.NET web applications. Must a lot of HTML code be written in the code file behind (.aspx.cs)?

Appreciate if you could provide some samples!

Thank you.

Re: Web form inheritance problem? tgreer at 01:20 on Monday, January 03, 2005

What would you accomplish by inheriting a page? The standard technique for ecapsulation/re-use is to create user controls.


Re: Web form inheritance problem? ipsoftware at 01:27 on Monday, January 03, 2005

The purpose of inheriting the page is to avoid duplicating code (e.g. function calls) as there are some user controls (e.g. buttons) will be the same in different web pages.

<Added>

is the "user control" you are referring to "web user control"? which we may find in the drop down menu by right clicking a web solution->Add->Add Web User Control?

<Added>

I think web user control may solve my problem. Thanks

Re: Web form inheritance problem? tgreer at 02:49 on Monday, January 03, 2005

Yes, that's it exactly. You're welcome.









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
matrix addition
Re: Storing data from HTML to Excel or TXT
Re: function within loop problem
Re: Ô‡´ò¥¯¥é¥Ö¤Ï ¥Æ©`¥é©`¥á¥¤¥É£ò£±£±¥¢¥¤¥¢¥ó ¤Î£··¬ ¤Ç¤¹
Re: Replace
Re: タイトリスト AP2アイアン 712�情�
Re: SMS from Perl using HTTP request
Re: Charl Schwartzel
Re: Adhyayan - Annual Student Conference and Online Coding Festival


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


Copyright codetoad.com 2001-2013