Customizing a Similar Assembly - Visual Web Part

I am working on a Visual Web Part that requires the creation of a custom control. I am trying to add a custom control to the same assembly as the Visual Web Part, and register the control as:

<%@ Register TagPrefix="cus" Namespace="SomeCustomControlNameSpace" %>

When I try to access this error on startup:

Unknown server tag 'cus: ControlName'.

Do I need to make any entry in Web.Config for this?

Any ideas?

+3
source share
2 answers

You must specify the register to look at.

<%@ Register TagPrefix="cus" Namespace="SomeCustomControlNameSpace" Assembly="SomeCustomControlAssembly" %>
+1
source

, ( ), , . - -, -. , -:

Web Application Properties.  Assembly name is: Example.Web

, , Register:

<%@ Register TagPrefix="jb" Namespace="CustomControlNameSpace" assembly="Example.Web" %>

, Microsoft ( , ):

@Register , :

  • App_Code, . . , @Register.

  • . .

  • (GAC). , . GAC . , , , .

+1

Source: https://habr.com/ru/post/1749389/


All Articles