in delphi i use this function to get an element by name
function getControlByName (qform : twebform; qname : string) : tcontrol;
var inta: integer;
begin
result := nil;
for inta:= 0 to qform.ComponentCount - 1 do begin
if qform.Components[inta].Name = qname then begin result := (qform.Components[inta] as tcontrol); exit; end;
end;
var inta: integer;
begin
result := nil;
for inta:= 0 to qform.ComponentCount - 1 do begin
if qform.Components[inta].Name = qname then begin result := (qform.Components[inta] as tcontrol); exit; end;
end;
end;
dont work here
How i can get an element by name ?