locked
Custom Controls vs User Controls RRS feed

  • Question

  • User-1870750982 posted

    Hi

    I want to make a custom control not user control.

    i mean i want to make some changes on one of the standard controls (e.g. TextBox,  Button, GridView, etc.)

     by adding some extra features to this control, and use it in my pages.

    my understanding that User controls is a new project that can have more than one control and work with each other as user want.

    is there any way i can create a Custom Control not User Control,

    again I mean add some features to a standard control class itself.

     

    Thanks.

    Thursday, March 18, 2010 7:18 PM

Answers

  • User-1878433365 posted

    Hello,

    What about the following walktrough:

     

    http://msdn.microsoft.com/en-us/library/yhzc935f.aspx

    Walkthrough: Developing and Using a Custom Server Control

    This walkthrough shows you how to create and compile a custom ASP.NET server control and use it in a page.

    During this walkthrough you will learn how to:

    • Create an ASP.NET server control.

    • Add metadata to the control and its members to control security and design-time behavior.

    • Use the App_Code directory in an ASP.NET Web site to test your control without manual compilation steps.

    • Specify a tag prefix in a configuration file and in the control's assembly.

    • Compile the control into an assembly and add it to the Bin directory.

    • Embed a bitmap into the control's assembly as the toolbox icon for a visual designer.

    • Use the compiled control in a page.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 18, 2010 8:02 PM

All replies

  • User-1878433365 posted

    Hello,

    What about the following walktrough:

     

    http://msdn.microsoft.com/en-us/library/yhzc935f.aspx

    Walkthrough: Developing and Using a Custom Server Control

    This walkthrough shows you how to create and compile a custom ASP.NET server control and use it in a page.

    During this walkthrough you will learn how to:

    • Create an ASP.NET server control.

    • Add metadata to the control and its members to control security and design-time behavior.

    • Use the App_Code directory in an ASP.NET Web site to test your control without manual compilation steps.

    • Specify a tag prefix in a configuration file and in the control's assembly.

    • Compile the control into an assembly and add it to the Bin directory.

    • Embed a bitmap into the control's assembly as the toolbox icon for a visual designer.

    • Use the compiled control in a page.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 18, 2010 8:02 PM
  • User-1870750982 posted

    Thats what i want...

    Thanks a lot 

    Thursday, March 18, 2010 8:32 PM