I have a Web service I created for doing math conversions (in this
case the partial volume of a sphere). I'm seeing a conflict with the
Web service method and the code-behind on my .aspx page that consumes
the service. Does anyone see anything wrong with the
code?: THANKS!!! (btw... this is not a
homework assignment)
Web service side (no compiler errors):
<System.Web.Services.WebMethod()> _
Public Function PartialSphereVolume(ByVal Radius As Double, ByVal
Height As Double) As Double
Return ((Radius * Math.PI * (Height ^ 2)) - (Math.PI *
((Height ^ 3) / 3)))
End Function
.aspx Consuming side (compile error is in the
"wsConvert.PartialSphereVolume(partialvolume)" phrase:
Protected Sub btnSpherePartialVolume_Click(ByVal sender As Object,
ByVal e As System.EventArgs) Handles btnSpherePartialVolume.Click
Dim wsConvert As New com.mysite.SphericalVolumeWebService
Dim partialvolume As Double
partialvolume = System.Convert.ToDouble(txtRadius3.Text)
partialvolume = System.Convert.ToDouble(txtHeight.Text)
System.Threading.Thread.Sleep(3000)
lblSphericalPartialVolume.Text = wsConvert.PartialSphereVolume
(partialvolume).ToString("#,##0.00")
End Sub