473,657 Members | 2,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

sharing code (includes and controls)

Joe
While I understand that Server Side Includes still work, I realize it's
not the best practice for sharing code such as a common set of includes
between screens.

In ASP.NET I've already built several User Controls and such for sharing
code between screens, but this typically was used things such as menus
and headers and footers.

What is the best practice in 1.1 for sharing code such as a common set
of functions used by multiple screens?

Can you create a control with a REGISTER declaration but not include
it's custom "tag" in the page, or just not have it outputting anything
in order to bring in some code? Are there any inheritance concerns? It
seems to me there should be a way to set the page to inherit some other
classes? How do you reference them? Do you need to compile them and add
them to an assembly or can they be referenced as files?

Thanks,

Joe
Mar 1 '06 #1
1 1505
> What is the best practice in 1.1 for sharing code such as a common set of
functions used by multiple screens?
Classes.
Can you create a control with a REGISTER declaration but not include it's
custom "tag" in the page, or just not have it outputting anything in order
to bring in some code? Are there any inheritance concerns?
Huh?
It seems to me there should be a way to set the page to inherit some other
classes?
A Page is a class. A class in .Net can inherit exactly 1 class. I get the
feeling this is not what you're asking here, but I am unable to discern what
it is.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
A brute awe as you,
a Metallic hag entity, eat us.
"Joe" <Jo*@nospam.com > wrote in message
news:uk******** ******@TK2MSFTN GP09.phx.gbl... While I understand that Server Side Includes still work, I realize it's
not the best practice for sharing code such as a common set of includes
between screens.

In ASP.NET I've already built several User Controls and such for sharing
code between screens, but this typically was used things such as menus and
headers and footers.

What is the best practice in 1.1 for sharing code such as a common set of
functions used by multiple screens?

Can you create a control with a REGISTER declaration but not include it's
custom "tag" in the page, or just not have it outputting anything in order
to bring in some code? Are there any inheritance concerns? It seems to me
there should be a way to set the page to inherit some other classes? How
do you reference them? Do you need to compile them and add them to an
assembly or can they be referenced as files?

Thanks,

Joe

Mar 1 '06 #2

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

Similar topics

3
2847
by: Robert W. | last post by:
I'm embarking on a project that will have both a desktop application and a Pocket PC application. It seems logical to have as much code as possible sitting in a shared project, which would be referenced and utilized by both the Windows Forms application and the Mobile Device application. Are there any "gotchas" (ie. warnings) that anyone knows about in following this approach? Robert W. Vancouver, BC
3
2786
by: Shikari Shambu | last post by:
Hi All, I have a situation where multiple applications are sharing some pages/ controls. So, I have a separate common project that has the common pages/ controls. My question is how do I reference these pages/ controls from my ASP.NET web projects WEbApp1 url http://localhost/app1 C:\Apps\App1
2
1075
by: Ajeet YS | last post by:
Hello, We need to share the same user controls among many developers in the same project. How do we achieve this? We have looked into using Custom controls, but they have a very high development time & at times can be complicated. How can we have a set of user controls, say in a separate project, and make use of it from there instead of copying the controls to each individuals project & then using it? We are VS.NET 2003 if its of any...
17
2694
by: tshad | last post by:
Many (if not most) have said that code-behind is best if working in teams - which does seem logical. How do you deal with the flow of the work? I have someone who is good at designing, but know nothing about ASP. He can build the design of the pages in HTML with tables, labels, textboxes etc. But then I would need to change them to ASP.net objects and write the code to make the page work (normally I do this as I go - can't do this...
2
1711
by: Carlo \(MCP only\) | last post by:
Hi to all I'm askyng you a suggestion about the best way to share the same source code between VS2003 and VS2005. The project I'm developing is a controls and components library, and the Solution.sln includes a standard WindowsForms application for testing pourposes. What I need is an efficient and reliable way to edit and test the DLL assembly in both environments, since the library will be distributed for Framework 1.1 and 2.0.
5
1452
by: Gregory Gadow | last post by:
All done in ASP.Net 2.0 using VB... The website I am developing has a large DLL that includes custom MembershipUser, MembershipProvider and RoleProvider classes, several frequently used web controls, custom base classes for Master and Page objects, so on and so on. All of this was done on my main dev machine, which I've also been using to write the website. On the dev machine, the DLL references compile Just In Time with no errors....
3
4910
by: =?Utf-8?B?U2FjaGluIFNha2k=?= | last post by:
Hi, Our application have asp and .aspx pages, we need to redirect user from asp page to .aspx page and vice-versa and want to share session state b/w asp and asp.net. This could be achieved by storing the session state in database. I have few quires on this. 1) What happen if asp session and asp.net session time out limit is different ? for example asp session limit is 20 min. and asp.net session limit is 30 min. if user is navigated from...
4
1643
by: Mike P2 | last post by:
Hi. I'm writing controls that have to query the database, and it bothers me that I might have several of these controls on a page that each create, open, and close their own connection with the same connection string, and the page class has a connection object too. I'm using the code-behind way of doing things, and I considered leaving the database connection open as a field in the page's class and somehow letting the controls use that...
8
1325
by: Nathan Sokalski | last post by:
I have a form that contains a number of fields, all of which have validators. There are two submit buttons, one to update a record and one to add a record. Because the only difference in validation is to make sure someone is not using a username that is already in use, I would like to be able to use all the other validators for both the add and update buttons. However, because as far as I know a validator can only be in one...
0
8402
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8829
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8734
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 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...
1
8508
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,...
0
8608
tracyyun
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...
0
4164
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...
1
2733
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1962
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1627
bsmnconsultancy
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...

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.