|
On ADD page you might want to prepopulate some edit boxes with
recently used values. This can be done using combination of Default
values and BeforeAdd Event.
Let's say at the end of day you need to enter several data
records for each Order. To prepopulate EmployeeID, ShipVia and
Freight fields with last entered values you need to the
following:
1. Set Default values of those fields to Page.Session("EmployeeID"),
Page.Session("ShipVia")
and Page.Session("Freight") respectively.
This can be done on the Formatting tab.
2. Use BeforeEdit Event to save EmployeeID, ShipVia and Freight
values in Session variables
-
|
C#
Page.Session["EmployeeID"] = (string)e["EmployeeID"];
Page.Session["ShipVia"] = (string)e["ShipVia"];
Page.Session["Freight"] = (string)e["Freight"];
|
|