This topic is locked
[SOLVED]

 Inline Add/Edit

9/18/2015 7:41:03 PM
ASPRunner.NET General questions
jadach authorDevClub member

This is how I get data into fields for add and edit pages using events.
values["AddedBy"] = XSession.Session["UserID"];

values["Added"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
How can I achieve the same when doing inline add and edit records from the list page?
Thanks

F
FrankR 9/18/2015



This is how I get data into fields for add and edit pages using events.
values["AddedBy"] = XSession.Session["UserID"];

values["Added"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
How can I achieve the same when doing inline add and edit records from the list page?
Thanks


Look at the params of the event method you are using. Some of them have a parameter telling you if it for inline or not.

jadach authorDevClub member 9/19/2015

Are you suggesting I add the event on the Edit Page Before Record Updated and add this?

inline["Updated"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
I tried, but got an error.

jadach authorDevClub member 9/21/2015

The answer is: Simply use before record added or edited. This works for inline from the list page as well as pop ups.

values["AddedBy"] = XSession.Session["UserID"];

values["Added"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
Thanks to Support <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=77911&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />