This topic is locked

How to Insert CreateBy, CreateAt, UpdateBy, UpdateAt

2/21/2008 11:44:57 AM
ASPRunner.NET General questions
Y
ykh author

How to Insert CreateBy(login id), CreateAt(system datetime) when a new record is being inserted?
Insert UpdateBy(login id), UpdateAt(system datetime) when a record is being updated?

Eugene 2/22/2008
  1. You can use default value property to fill fields with necessary data.
  2. To fill fields with necessary data you can use "Before record added" and "Before record updated" Events

    f.e.:

    public static bool BeforeEdit(System.Web.UI.Page Page, ObjectDataSourceMethodEventArgs e)

    {

    e.InputParameters["Date"] = DateTime.Now;

    }