Delegate Controls RRS feed

  • Question

  • I have a user control .ascx with some code in its code-behind.The user control doesnt renders anything.
    I want to add this user control through sharepoint delegate controls.

    And the code inside it ,I need to apply it to Sharepoint list forms(Newform.aspx,Editform.aspx etc)

    To which delegate control i should add this user control?

    I am using MOSS 2007

    Thursday, May 2, 2013 3:01 PM

All replies

  • Hi,

    For this issue, I’m trying to involve someone familiar with this topic to further look at it.

    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact

    Qiao Wei
    TechNet Community Support

    Friday, May 3, 2013 6:03 AM
  • Hello Ankit,

    You can convert your ascx file into a web part and then add this web part to the SharePoint list forms.

    To convert your ascx control to MOSS 2007 web parts, you can use Return of Smart Part tool : http://smartpart.codeplex.com/releases/view/10706

    To add the web part in the list forms, you can add "&ToolPaneView" at the end of the list form URl, this will allow you to add the web part in the list form pages. http://www.sharepointkings.com/2008/05/how-to-edit-list-forms-like-newformaspx.html

    Let me know if this information helps you!!!




    • Edited by Deepak Kmr Monday, May 6, 2013 5:30 PM
    Monday, May 6, 2013 5:29 PM
  • Hello Deepak,
    Thanks for your response. :)

    Adding a user control webpart is a workaround ,but it is not what I intend to do.
    The problem with a webpart is ,I have to exclusively add it to every page where I need it.

    Delegate controls would avoid me doing this.

    Monday, May 6, 2013 5:38 PM
  • Hello Ankit,

    Each list type generally has a set of display, edit, and new form ASPX pages (DispForm.aspx, EditForm.aspx, and NewForm.aspx) that are provisioned when lists are provisioned. These ASPX pages are provisioned into the “content space.” In other words, they are not located in \12\TEMPLATE\LAYOUTS, and they do not operate through the /_layouts virtual directory.

    so, you will have to add the custom code manually in each list's forms.

    For document libraries, these pages are instead provisioned within a hidden subfolder of the list called forms. For other SharePoint lists, the pages are provisioned under the list root folder.




    Thursday, May 9, 2013 3:37 PM
  • Adding code manually is an alternative ,but then I've to add it to Newform as well as Editform.aspx.

    I guess delegate control would avoid me doing this.
    The only problem is, to which SharePoint delegate control should I associate my user control?
    Monday, May 20, 2013 1:07 PM