code_junkie

How to define default “TagPrefix” for custom controls

Nov 11th, 2011
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. [ToolboxData("<{0}:MyDropDownList runat="server" CustomProp="123"></{0}:MyDropDownList>")]
  2. public class MyDropDownList: DropDownList
  3. {
  4. ... code here
  5. }
  6.  
  7. <%@ Register Assembly="DBMClientPortal.Controls" Namespace="DBMClientPortal.Controls"
  8. TagPrefix="cc1" %>
  9.  
  10. [assembly:TagPrefix("MyControls","RequiredTextBox")]
Add Comment
Please, Sign In to add comment