Question

I have created a custom Button with some extra properties. I want to register it in my Application Page like this

<%@ Register Namespace="Test1.Test2.Helpers" Assembly="Test1.Test2" TagPrefix="test" %>

But it casts an exception and saying something like it cannot find the assembly.

Was it helpful?

Solution

You need to deploy the assembly to GAC and use the fully qualified Name in assembly tag as:

<%@ Register Tagprefix="MyControls" 
    Namespace="KM.MyControls.MyControl" 
    Assembly="KM.MyControls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=<Your token>" %>

Then you can reference your User Control

   <MyControls:MyUserControl runat="server"/>
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top