Copied to clipboard

Flag this post as spam?

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


  • matthew 6 posts 26 karma points
    Jan 25, 2012 @ 16:13
    matthew
    0

    Saving Data in Umbraco

    Basically I have created a user control, wrapped it in a custom data wrapper and used it as a data type on a cms template page where there are other tabs.

    Now I can Save the data from this control to my own table. However I need to save data for this control in the umbraco way. So for example

    I have a property page.

    A property page has a images tab, an about us tab. All thede controls are ones in umbraco. Now I add my control, features control. Int he code behind for the user control where should i save the data too. When a user clicks saves at present umbraco does the save for say a text box which was a prebuild field.

     

    Which tables do i need to save to- is sql the best way of doing this. Where do i need to save xml.

     

    I need a decent article explaining where to save data and how to save data in the umbraco database. So for example my property feautures which tables do i save them to.

  • Jeroen Breuer 4861 posts 12138 karma points MVP 3x admin c-trib
    Jan 25, 2012 @ 16:24
    Jeroen Breuer
    0

    You can store your data in custom tables, but you can also store it as xml in the Umbraco tables. Have a look at the Digibiz Email Form with TinyMCE. It saves multiple values as xml in the database. You can download the source here

    Jeroen

  • matthew 6 posts 26 karma points
    Jan 25, 2012 @ 16:26
    matthew
    0

    Thanks looking into now. Which tables do i need to store the info in

  • Jeroen Breuer 4861 posts 12138 karma points MVP 3x admin c-trib
    Jan 25, 2012 @ 16:29
    Jeroen Breuer
    0

    If you're using the usercontrol wrapper you don't have to worry about that. Just do it like in this example: http://our.umbraco.org/forum/developers/extending-umbraco/28001-Get-value-from-custom-control!.

    Have a look at the source code I just mentioned. There you'll see the xml will be stored as a string, but it works very easy.

    Jeroen

  • matthew 6 posts 26 karma points
    Jan 25, 2012 @ 16:43
    matthew
    0

    I am lost- so overide xmlnode is something umbraco calls by default which i need to override. Can i implement this code in my project as a user control or do i need to compile so then i cant step through

  • Jeroen Breuer 4861 posts 12138 karma points MVP 3x admin c-trib
    Jan 25, 2012 @ 16:45
    Jeroen Breuer
    0

    Maybe these blogposts will help :)

    http://www.nibble.be/?p=24

    http://www.nibble.be/?p=100

    Jeroen

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies