Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access value of control from HTML body
Message
 
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00975242
Message ID:
00977621
Views:
28
Fred,

You should be able to set/get the .value property of the control. Does this sample code help?
oIE = createobject( "internetexplorer.application" )
oIE.Visible = .t.
oIE.Navigate( "www.google.com" )
do while oie.Busy()
  doevents
enddo
loDoc = oIE.Document && get the Document object
loForm = loDoc.forms(0) && get the first form object
loForm.Item(3).Value = "foxpro" && this is the field for the search string
loform.Submit() && submit the form

you can use code like to find the items of a form:

* explore the form items

for i = 0 to loForm.Length-1
  ? i, loForm.Item(i).Name, loForm.Item(i).Value
endfor

You can also access the items by their names:

loItem = loForm.item( "q" )
loItem.value = "this is so cool"
>Okay, basically I need to control a Microsoft agent in an ASP.net/C# page. I can load the agent without any problems and get it to read some text. But I want the text that is read to be a value from a database. The agent has to run on the client. Therefore, I need to read the value of the control in the body of the HTML code.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform