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
    0

    Update Record c# function

    Hi

    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?

    /Marianne

  • pranjal 41 posts 131 karma points
    4 days ago
    pranjal
    0

    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 = 
     @1,arg0,arg1);
    
    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
    0

    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:

Draft