This topic is locked
[SOLVED]

 How to read screen controls value

12/26/2010 2:10:35 AM
ASPRunnerPro General questions
A
admin author

Hi,
I have inserted one button on 'View' page in visual editor and as a action I want to read all controls value and I want to insert this record into another table. I have two question for this.

  1. How i can read controls value to put in server tab of insrted button.
  2. How I can get the current record as a query which is currently showing on 'View' Page.
    I will appreciate if somebody can let me know this as i got stuck on this.
    Sami

J
Jane 12/27/2010

Sami,
For the Edit/View pages the keys parameter in the OnServer event contains the information about the current record. To access specific key column you can use keys("KeyFieldName").

Here is just a sample:

set dal_TableName = dal.Table("TableName")

set rstmp = dal_TableName.Query("KeyFieldName=" & keys("KeyFieldName"),"")

'all values are in the rstmp() array, i.e. you can use rstmp("FieldName") to access FieldName value

rstmp.close

set rstmp=nothing
A
admin author 12/27/2010

Thanks Jane,
It's done as you said. appreciate your help.
Sami