G
Guest
Hi there,
I'm new to web services. I'm writing a basic file maintenance
application in asp.net. For example I'll fill a grid with all the records
from a table, then allow the user to select a record (row) and I'll show the
individual fields of the row in the form. The user can update the fields and
then I'd like to send the fields back through a web service for updating.
I've tried to specify a custom class as the parameter. See the example
below. My problem is that when I specify the class as a paramenterin the
client application I get a compile time error "Value of type
"IdealClass.atyMaint' cannot be converted to
'Ideal.updAccountType.atymaint." Atymaint is the name of my class. I have
this class defined in a project that is separate from my web service project
and my client project. I then reference this class from both the web service
and client projects. See the excerpts below.
From IdealClass project in atyMaint.vb
Public Class atyMaint
Public AMTYP as string
Public AMDESC as string
Public AMPRICE as string
End Class
From client project
dim atymaint as new idealclass.atymaint
atymaint.amtyp = me.txttype.text
atymaint.amdesc = me.txtdesc.text
atymaint.amprice = me.txtprice.text
dimWebservice as new updAccountType.updAccountType
errMsgString = Webservice.updAccountType(atymaint)
From web service project
<WebMethod () > _
Pubic Function updAccountType(ByVal atymaint as IdealClass.atyMaint) as
string
... stuff
End Function
I'm new to web services. I'm writing a basic file maintenance
application in asp.net. For example I'll fill a grid with all the records
from a table, then allow the user to select a record (row) and I'll show the
individual fields of the row in the form. The user can update the fields and
then I'd like to send the fields back through a web service for updating.
I've tried to specify a custom class as the parameter. See the example
below. My problem is that when I specify the class as a paramenterin the
client application I get a compile time error "Value of type
"IdealClass.atyMaint' cannot be converted to
'Ideal.updAccountType.atymaint." Atymaint is the name of my class. I have
this class defined in a project that is separate from my web service project
and my client project. I then reference this class from both the web service
and client projects. See the excerpts below.
From IdealClass project in atyMaint.vb
Public Class atyMaint
Public AMTYP as string
Public AMDESC as string
Public AMPRICE as string
End Class
From client project
dim atymaint as new idealclass.atymaint
atymaint.amtyp = me.txttype.text
atymaint.amdesc = me.txtdesc.text
atymaint.amprice = me.txtprice.text
dimWebservice as new updAccountType.updAccountType
errMsgString = Webservice.updAccountType(atymaint)
From web service project
<WebMethod () > _
Pubic Function updAccountType(ByVal atymaint as IdealClass.atyMaint) as
string
... stuff
End Function