About ASP.NET Web Custom Controls

Asked 2 years ago, Updated 2 years ago, 86 views

When using the ASP.NET Web Custom Control,
in the ASPX file: We have added a description.

'<%@Register tagprefix="tagprefix name" namespace="namespace name" assembly="ASSEMBLY name"%>'

Is it possible to omit the assembly="assembly name" part above?

to refer to the current project assembly instead of explicitly specifying it Would it be possible to?

c# asp.net

2022-09-30 19:34

1 Answers

You can omit the assembly attribute only if the source code of the control is in the App_Code directory.So it's a "current project," but the assembly is different because it's dynamically compiled.

If you want to reduce the amount of description, you should use the controls element in Web.config.


2022-09-30 19:34

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.