PDA

Click to See Complete Forum and Search --> : ActiveX control in ASP


vispi
Jun 6th, 2000, 09:23 PM
An self developed activeX control containing a MSFLexGrid needs to be used in ASP for displaying the data.(Can't help it ;such is the requirement).
I have exposed a property called "recordset"

This property needs to be assigned to a variable "rowsretrieved" through asp page
where
rowsretrieved=myobj.viewclientdetais("xxx")..on asp..No problem
and
viewclientdetails=rs.getrows..in dll...No Problem..


The code for the control is shown.

Private m_recordset As Variant

Public Property Get recordset() As Variant
recordset = m_recordset
End Property

Public Property Let recordset(ByVal vNewValue As Variant)

m_recordset = vNewValue
PropertyChanged "recordset"
populategrid

End Property

Private Sub populategrid()
FGViewClients.Rows = UBound(m_recordset, 2) + 1
FGViewClients.Cols = UBound(m_recordset, 1) + 1
For i = 0 To FGViewClients.Rows - 1
FGViewClients.Row = i
For j = 0 To FGViewClients.Cols - 1
FGViewClients.Col = j
FGViewClients.Text = Trim(m_recordset(j, i))
Next j
Next i

end sub
When a standard exe is added to this project and in the form load event when I retrieve the recordset and pass it to the control's property
like ctrl1.recordset=rowsretrieved
the grid correctly displays the value .

But thru asp I am facing problems:
<% rowsretrieved=myobj.viewclientdetails("xxx") %>

The object tag along with param name=recordset value=<%rowsretrieved%> is included.

MSDN has to say this
If the <OBJECT> tag includes any <PARAM NAME> attributes, the property values supplied with those attributes are passed to the control's ReadProperties event using the standard PropertyBag object


If any friend out there has developed an activeX control for use in ASP pl. share the secret
SOS
Vispi

GerdS
Nov 29th, 2001, 06:09 AM
HI

is is a long time ago, you write this articel.
I have got a similary problem.
wenn I want to pas parameters to my activeX contrl, the
IE don't lod the control.
do you have any soloutions for me.

thanx

gerd

monte96
Nov 29th, 2001, 09:29 AM
Don't mix html and asp for yoru object tag. Use Response.write to create the entire thing from <object> to </object>.

monte96
Nov 29th, 2001, 09:29 AM
Also, make sure you have a license pack file on the page for the flexgrid or it won't display for anyone who doesn't have VB installed..

GerdS
Nov 29th, 2001, 10:36 AM
nice that you help me.

i have my own active X control build in vb.
can you explane me how i have to build a file to install my control on the client.
further more i have a problem with the parameters.
when i have no parameters in the <PARAM> Tag the control is loaded.
but when their is a parameter the Internet Explorer bring security warning...and no control is loaded.
(the securitylevel of the IE is lowest)

please help

thanks

gerd

monte96
Nov 29th, 2001, 03:36 PM
Do a search of the forums here for 'lpk' and it will either outright describe the process or point you to the appropriate MDSN knowledgebase article on it. Suffice to say that if you don't have a LPK file referenced on your page and your control uses intriinsic ActiveX controls that require licensing when used on the web, it will not load.

As for parameters make sure you are not writing them with <%%> asp code. That won't work.