Embed
Email

Computer Notes

Document Sample
Computer Notes
Stats
views:
6
posted:
8/19/2009
language:
English
pages:
1
Questions and answers in this FAQ have been collected from newsgroup posts, various mailing lists and the employees of Syncfusion. 27. Custom Controls 27.1 How do I insert custom @ Register tags into the aspx file from my custom control? FAQ Home



27.1 How do I insert custom @ Register tags into the aspx file from my custom control? In the custom control's custom designer's Initialize override, do something like this:



[C#] public override void Initialize(IComponent component) { base.Initialize (component); IDesignerHost host = component.Site.Container as IDesignerHost; IDesigner designer = host.GetDesigner(host.RootComponent); // Calling GetHTMLFromWebControlTool with the following custom toolboxitem will insert the // Register directives for the type associated with that . MethodInfo mi = designer.GetType.GetMethod("GetHTMLFromWebControlTool", BindingFlags.NonPublic | BindingFlags.Instance); if(mi != null) { // DependantType is a custom type defined in DependantAssembly.dll mi.Invoke(designer, new object[]{new WebControlToolboxItem(typeof(SomeNamespace.DependantType))}); } }



C Then when the user drags and drops the item from the toolbox, besides the default @ register entry it makes, it will also make an entry like this: The assembly will not be strong named in the above tag if it's not in the GAC.



© 2001-2008 Copyright Syncfusion Inc. All rights reserved. | Privacy Policy | Contact | Sitemap




About
I am Computer Professional, did my MCA and seeking a Job in Software industry. I love computers
Other docs by aswath ramacha...
Computer Notes
Views: 39  |  Downloads: 1
JAVA
Views: 7  |  Downloads: 0
Interview questions
Views: 5  |  Downloads: 0
Interview questions
Views: 12  |  Downloads: 1
Wireless Networking
Views: 94  |  Downloads: 2
Computer Notes
Views: 15  |  Downloads: 0
Computer Notes
Views: 111  |  Downloads: 0
Wireless Networking
Views: 2  |  Downloads: 0
Interview questions
Views: 5  |  Downloads: 0
Interview questions
Views: 101  |  Downloads: 3
Related docs
By registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!