Whenever possible, i rather to use UserControl instead of WebControl, since WebControls are more complicate to create and later on to maintain. But in case that i have to build a WebControl, i rather build a CompositeControl. Way CompositeControl? CompositeControl eventually inherit from WebControl, but each control inside the CompositeControl manage its own life cycle events and the ViewState / PostBack data. This means that we going to save a lots of code writing by not handling this events our...
ASP.NET offers some nice tools to use with our common web sites development. Some of them is the Menu and TreeView controls. Consider the following SQL Table: lets say I want to display all the child categories under there parent categories in a nice DHTML menu. First Step - Add a Menu control to the ASPX file. < asp:Menu runat ="server" ID ="Menu1" > < DataBindings > < asp:MenuItemBinding TextField ="CategoryName"...