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

UserControls in multiple applications

I'm building two applications for one website, one is the public website and
the other is our private admin site.

Fors some of the sales processing utilities I'm using user controls to
contain some logic of thing like credit card input, user registration.

Is there a way to get around this?

What I was thinking was doing an include to contain the body of the ASCX
page and having the codebehind page directly inherit the the class for the
original control.

Is there another way to do this?

My goal here is to be able to make updates in one place and have them
cascaade through both applications.

Could I set it up as a vitural directory?
Nov 18 '05 #1
1 1108
You could always develop a class library. Expose a class called
MyCompany.MyApplication.PageWithControls, which derives from
System.Web.UI.Page. Then, implement the controls on this page. Compile and
strong name this class, then install it in the GAC. Both applications can
now find this assembly and bind to it. Then, in both of your applications,
have your new pages derive from MyCompany.MyApplication.PageWithControls.
When you need to update the base class, you need only update the assembly
that implements PageWithControls, and the changes will cascade to all other
applications which derive from this class.

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"Joel Barsotti" <jo**********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I'm building two applications for one website, one is the public website
and
the other is our private admin site.

Fors some of the sales processing utilities I'm using user controls to
contain some logic of thing like credit card input, user registration.

Is there a way to get around this?

What I was thinking was doing an include to contain the body of the ASCX
page and having the codebehind page directly inherit the the class for the
original control.

Is there another way to do this?

My goal here is to be able to make updates in one place and have them
cascaade through both applications.

Could I set it up as a vitural directory?

Nov 18 '05 #2

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

Similar topics

2
by: putman | last post by:
I am sure that this has come up here before, but the Search is not working for me for this newsgroup. I am working on a Windows Forms project where I have created a number of usercontrols that I...
1
by: Santa | last post by:
I'm creating a webform this winter, and using multiple usercontrols on the page. Each of these controls has a textbox and button. When page gets postedback the button I clicked event handler...
2
by: Darrel | last post by:
I have a page with a few user controls. One is the HEADERTAGS (that writes out the tags in the <header> of the page) and one is MAINCONTENT (that writes out the main body content on the page) ...
4
by: Anders K. Jacobsen [DK] | last post by:
Hi I have some common UserControls i want to share between to sites (on the same mashine but on diffrent virtual paths). right now i have on solution file with aprox 10 projects. 2 of these is...
3
by: Carl Johansen | last post by:
I have a big ASP website (used by several thousand car dealers) that is a collection of lots of small and medium-sized applications. Now I want to start adding ASP.NET applications to it. I have...
0
by: koen | last post by:
Hi! In asp.net (version 1.1) I run into a problem when trying to perform client validation. The error I get on the client-side is : "Error: expected ';'". This problem occurs when I place a...
17
by: Crirus | last post by:
Hello Right now I have 3 projects to my solution... 2 user controls and a tester I need to embed both controls in a third one, and the final build to output only one assambly..How can I do that?...
5
by: David Lozzi | last post by:
Hello, I have an interesting issue, so bear with me as I try to explain. I have a datalist posing as tabs for my application. And as each tab is clicked, a placeholder is then populated with the...
7
by: Nathan Sokalski | last post by:
I have a page which I dynamically add several usercontrols (*.ascx files) to using the following code: Public Sub Refresh() For Each section As DataRow In Me.GetSections().Rows...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.