CodeCharge Studio | All ASP PHP Perl ColdFusion Java C#.NET VB.NET |
This example shows how to change the value of a control in the Before Show event.
In this instance, we will change the value of a control called FirstName which is located in a form called User.
Function User_FirstName_BeforeShow(Sender) User.FirstName.Value = "Bob" End Function
function User_FirstName_BeforeShow(& $sender) { global $User; $User->FirstName->SetValue("Bob"); }
sub User_FirstName_BeforeShow() { $User->{FirstName}->SetValue("Bob"); }
<!--- Users_FirstName_BeforeShow ---> <CFSET fldFirstName = "Bob">
'Users_FirstName_BeforeShow UserFirstName.Text= "Bob"
//Users_FirstName_BeforeShow UserFirstName.Text= "Bob";
//Users_FirstName_BeforeShow e.getControl().setValue("Bob");
Function Orders_BeforeShowRow() Orders.Total.Value=Orders.Quantity.Value * Orders.Price.Value End Function
function Orders_BeforeShowRow() { global $Orders; $Orders->Total->SetValue( $Orders->Quantity->GetValue() * $Orders->Price->GetValue() ); }
sub Orders_BeforeShowRow() { $Orders->{Total}->SetValue( $Orders->{Quantity}->GetValue() * $Orders->{Price}->GetValue() ); }
<!--- Orders_BeforeShow ---> <CFSET fldTotal=fldQuantity * fldPrice>;
Note: Set the Data Type property to Integer or Float for the Quantity and Price Labels..
'Orders_BeforeShow OrdersTotal.Text = (item.Quantity.Value * item.Price.Value).ToString()
Note: Set the Data Type property to Integer or Float for the Quantity and Price Labels.
//Orders_BeforeShow OrdersTotal.Text = (((Int64)item.Quantity.Value) * ((Int64)item.Price.Value)).ToString();
Note: Set the Data Type property to Integer or Float for the Quantity and Price Labels.
//Orders_BeforeShow e.getRecord().getControl("Total").setValue(e.getRecord().getControl("Quantity").getValue().longValue() * e.getRecord().getControl("Price").getValue().doubleValue() );
Function Page_BeforeShow() CurrentUser.Value="Bob" End Function
function Page_BeforeShow() { global $CurrentUser; $CurrentUser->SetValue("Bob"); }
sub Page_BeforeShow() { $CurrentUser->SetValue("Bob"); }
<!--- Page_BeforeShow ---> <CFSET fldCurrentUser="Bob">
'Page_BeforeShow CurrentUser.Text="Bob"
//Page_BeforeShow CurrentUser.Text="Bob";
//Page_BeforeShow e.getPage().getControl("CurrentUser").setValue("Bob");