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
    Apr 17, 2018 @ 10:22
    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 75 posts 188 karma points
    Apr 17, 2018 @ 11:08
    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.

  • 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