Creating Custom Server Controls in ASP.NET

Creating a compelling Web user interface is hard work. Any time you can take advantage of .NET features to make your UI elements more reusable, you should take it. User controls offer one options. But, if you really want flexibility and power, you really have to move to custom server controls. Visual Studio .NET doesn't offer a visual interface for creating custom server controls as it does for user controls, but it really isn't that difficult to create them yourself.

In this video, you walk through the process of creating a custom server control. You will dig into an example that displays a die (for use in, say, a Yahtzee game or a craps game). You will see how to define your own properties that appear in the Properties window and how to control the rendering process. After the control is complete, you will see how to create an ASP.NET application that contains your control, and you'll then use the control to create a functional Web page.

This video demystifies the process of creating your own server controls and gives you a strong foundation for building your own user interface masterpieces.

  Click Here to watch the video!  


From the CodeGuru editors: This link is to a Windows media file (.WMV); you must have a program such as Windows Media Player to view it. This is the first video we have posted, so we are not sure yet what performance you will get.

If you do not have have a high-bandwidth connection, you should not try to view this video. If you like this video, please add a comment so we know to consider more in the future!



About the Author

Bill Hatfield

Bill Hatfield is the best-selling author of numerous books for developers, including ASP.NET For Dummies, Active Server Pages For Dummies (on Classic ASP) and Visual InterDev For Dummies. He is also the editor of Visual Studio .NET Developer, a monthly technical journal from Pinnacle. He's an experienced corporate trainer and works in Indianapolis, IN where he also co-founded the local .NET group, the Indianapolis .NET Developers Association.

Comments

  • A very nice start.

    Posted by jkarafin on 11/05/2005 04:53pm

    Thanks so much for the video. I wish you had one that covered an example for the composite controls. I'm now struggling mightily with a composite user control, because I can't get it to retain-and-render the contents of component list boxes. I don't know if trying a customer control will simplify my life or make it even more complicated! (By the way, positioning a user control isn't as easy as you made it sound. I ended up positioning a panel within the aspx, then adding the user control to the panel.) I swear - I'd pay real money for videos like yours that addressed issues I have.

    Reply
  • Please Send me the Code

    Posted by sidiqahmed on 07/20/2005 08:23am

    Please Send me the Code

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: December 11, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT Market pressures to move more quickly and develop innovative applications are forcing organizations to rethink how they develop and release applications. The combination of public clouds and physical back-end infrastructures are a means to get applications out faster. However, these hybrid solutions complicate DevOps adoption, with application delivery pipelines that span across complex hybrid cloud and non-cloud environments. Check out this …

  • VMware vCloud® Government Service provided by Carpathia® is an enterprise-class hybrid cloud service that delivers the tried and tested VMware capabilities widely used by government organizations today, with the added security and compliance assurance of FedRAMP authorization. The hybrid cloud is becoming more and more prevalent – in fact, nearly three-fourths of large enterprises expect to have hybrid deployments by 2015, according to a recent Gartner analyst report. Learn about the benefits of …

Most Popular Programming Stories

More for Developers

RSS Feeds