I am having a little bit of trouble getting my aspx pages to recognize my tagPrefixes.
I have the standard ASP ones defined...
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
Then I have my custom controls defined below that but I do not think I am defining them properly because sometimes the page does not see any controls in the current context other times they work like a champ...
<add tagPrefix="mri" namespace="Mri.Controls" assembly="Mri.Controls"/>
<add tagPrefix="mri" namespace="Mri.Controls.Inputs" assembly="Mri.Controls"/>
<add tagPrefix="mri" namespace="Mri.Controls.Inputs.DropDowns" assembly="Mri.Controls"/>
<add tagPrefix="mri" namespace="Mri.Controls.Inputs.Search" assembly="Mri.Controls"/>
I have one namespace "Mri.Controls" and inside of that namespace I have several sub-folders, "Inputs" -> "DropDowns" etc...
What am I doing wrong? Currently the regular ASP controls are giving me an error: The name "blahBlah" does not exist in the current context.
The sub-folders may or maynot become part of the namespace. By default, Visual Studio does include them when creating new classes but that can be removed in the class. If you moved the controls to the sub-folders, then the folder's name is likely not part of the namespace.
Also, make sure you are referencing your controls assembly or project within Visual Studio.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With