I have a basic question should be easy. I have a WebControl project and I had to create a ITemplate and separate out some of the code for the container. In my new class it is not a WebControl of course it is an ITemplate. In that container though I need to have a ImageButton and the ImageURL is a embedded web resource. My line of code is:
btnSearch.ImageUrl = Page.ClientScript.GetWebResourceUrl(this.GetType(), "MyProject.Control.images.addressbook.gif");
Error is coming up of course:
An object reference is required for the non-static field, method or property 'System.Web.UI.Page.ClientScript.Get'
I beleive it is in the "this.GetType() and I can't have this in here as it is not a page or something.