Last chance to get discounted tickets to Codegarden... Price goes up on Tuesday at 20:00 CEST!

Copied to clipboard

Flag this post as spam?

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

  • Marianne Larsen 22 posts 94 karma points
    4 days ago
    Marianne Larsen

    Update Record c# function


    I haven't been able to find any answers in here, that explains how to create a function to update/edit a form record.

    I would like to create an administration page behind login, where admins are allowed to edit in some of the fields of a record. Is this possible?


  • pranjal 41 posts 131 karma points
    4 days ago

    Use Umbraco Sql Query to update the Details.

    Update Query

     var db = ApplicationContext.Current.DatabaseContext.Database;
     var updateQuery = new Sql("update table set name = @0 where id = 
    var response =  db.Execute(updateQuery);

    Use this like umbraco sql query to update your details

    I Assume that you Know MVC paradigm just follow that you will easily update the records.

  • Marianne Larsen 22 posts 94 karma points
    3 days ago
    Marianne Larsen

    Hi thanks for your reply.

    Is this the correct and only way to update a form record? I was sure that i had to tab into the recordservice.

Please Sign in or register to post replies

Write your reply to: