Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Eduardo 106 posts 130 karma points
    Nov 23, 2010 @ 18:40
    Eduardo
    0

    How to create a new simple.ascx" control

    Hi,

    I have in my section a tree of "category" elements loaded with data from a table.

    http://es.tinypic.com/r/24wreio/7

    In my database, I have another table for storing documents, which are linked to this categories.

    I want to build a control based on "simple.ascx" for creating elements of type "category" and "document" under "category" elements.

    How can I do this?

    Thanks in advance.

    Regards,
    Eduardo

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Nov 23, 2010 @ 22:59
    Aaron Powell
    0

    Are you asking how to interact with an external database? 

    You should start by looking into how to use either LINQ to SQL: http://msdn.microsoft.com/en-us/library/bb425822.aspx, Entity Framework 4: http://msdn.microsoft.com/en-us/data/ef.aspx, or one of a number of open source/ free ORM alternatives (NHibernate, SubSonic, etc).

    You can then host your component in Umbraco as either a standard UserControl (ie - embed it in the template) or load it through the Macro engine.

  • Eduardo 106 posts 130 karma points
    Nov 23, 2010 @ 23:23
    Eduardo
    0

    Hi Slace,

    Thank your for your answer.

    Are you asking how to interact with an external database?

    No.

    I want to customize the nodes creation form. I've got a new section with new elements(Categories and documents). In this section, the user shall create elements(nodes) of type "category" and type "document" through create form:

    http://es.tinypic.com/r/nwevig/7

    My question is: How can I customize the simple.ascx(the previous form) control to fit my needs( create nodes of type "category" and "document").

    Which handler should I use?

    Now I can create,delete and update nodes of type category.

    Sincere regards,
    Eduardo Macho

Please Sign in or register to post replies

Write your reply to:

Draft