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

  • The explosion in mobile devices and applications has generated a great deal of interest in APIs. Today's businesses are under increased pressure to make it easy to build apps, supply tools to help developers work more quickly, and deploy operational analytics so they can track users, developers, application performance, and more. Apigee Edge provides comprehensive API delivery tools and both operational and business-level analytics in an integrated platform. It is available as on-premise software or through …

  • Live Event Date: September 10, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Modern mobile applications connect systems-of-engagement (mobile apps) with systems-of-record (traditional IT) to deliver new and innovative business value. But the lifecycle for development of mobile apps is also new and different. Emerging trends in mobile development call for faster delivery of incremental features, coupled with feedback from the users of the app "in the wild". This loop of continuous delivery and continuous feedback is …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds