Hi,
Im trying to convert my UserControls to be sharable across multiple projects.
I have read up on this, and it seems that I need to have all code in one file (i.e. in the .ascx, rather than codebehind/designer) so I am trying to do this:
<%@ Control Language="C#" AutoEventWireup="true" ClassName="ImageButton" Inherits="Button" %>
<%@ Register src="Button.ascx" tagname="Button" tagprefix="MIKE" %>
<script runat="server">
protected override void OnInit(EventArgs e)
{
this.ImageTag.Src = ImageStartPath + "/" + ImgSrc + "_Up.png";
base.OnInit(e);
}
...
the problem is, that despite the "Inherits" attribute on the <%@ Control tag, set to "Button", which is the base class im trying to inherit from, I can't get the base class of my ImageButton class to be Button, it just stays as the basic UserControl, which is a problem, because I am trying to inherit some properties from the base class...
Any ideas?
Thanks,
Mike