Hi,
I am new to ASP having previously been doing Java.
I think User Controls are good but I have problem that I cannot solve -
spent a long time searching the
web without so far much success.
The problem:
I am using a UserControl to display a company log on the page with the
thought that if the logo changes I
can change the view on the Web site without having to alter any code.
However our site is to be marketed to different companies who will want to
see their own logo on the
page.
The original UserControl ascx file merely delivers the logo in an img tag.
My goal is to allow the following:
Example: User (a) logs and sees the logo for the company they work for
User (b) logs into the same site but sees a different logo as
they work for
a different company.
I am attempting to do this programmatically but failing at the moment.
Is it possible to alter the ascx file called for each user within the .cs
file Page_Load method?
My master file has:
<%@ Register Src="UserControls/ClientIcon.ascx" TagName="ClientIcon"
TagPrefix="uc1" %>
....
<body>
....
<uc1:ClientIcon ID="ClientIcon1" runat="server" />
....
</body>
Each separate ascx file has:
<%@ Control Language="C#" ClassName="ClientIcon" AutoEventWireup="true"
CodeFile="ClientIcon.ascx.cs"
Inherits="UserControls_ClientIcon" %>
<div>
<img src="images/[name of logo gif file]" width="280" height="91"
alt="Client image" border="0"
class="ClientIcon">
</div>
Hope this is understandable - can anyone help please.
Thanks in advance
Andrew
P.S If this is the wrong way please let me know - thanks
--
Andrew Mercer
-----------------