- Remove all the generated code
- Start typing: toolbar...
- Press tab two times
- Fill the necessary snippet variables
- MyLibrary can stay as it is since this is our namespace name.
- Replace MyControl with HelloToolbar.
- Visual Studio generates the code.
- Name must be the same as registered in the WebResource contract.
- Name must be the same as registered in the ClientScriptResource contract.
- Start typing: control...
- MyLibrary namespace can stay as it is our namespace.
- Use HelloToolbar as the control’s name (as it was contracted in the C# part).
- Use ExtJS.Controls.Component as the base class for registration of the control.
Remember to set the Build Action to Embedded Resource!
Otherwise ASP.NET won’t know about this code. Since it is registered in the C# part, not having an embedded resource like that would produce an error.