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

  • As a result of corporate expansions, mergers, and acquisitions, the teams and technologies that support an organization's IT service management (ITSM) practices can over time become somewhat dispersed. Supporting an organization's strategic objectives, and providing consistent and quality IT support is essential, but this can be challenging where disconnected support environments exist. While physically centralizing support is not always possible, nor is it always desirable, delivering a consistent and …

  • Protecting business operations means shifting the priorities around availability from disaster recovery to business continuity. Enterprises are shifting their focus from recovery from a disaster to preventing the disaster in the first place. With this change in mindset, disaster recovery is no longer the first line of defense; the organizations with a smarter business continuity practice are less impacted when disasters strike. This SmartSelect will provide insight to help guide your enterprise toward better …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds