Hi
I have this in my code file right now:
Partial Class courseTabs
Inherits System.Web.UI.UserControl
Public Function getDuration() As String
Dim value As String = XPath("duration")
Return String.Concat("<li><strong>Duration: ", value , "</strong>.</li>")
End Function
Public Function getMOPrice() As String
Dim value As String = XPath("prices/price[@vehicle='mo']")
If value Is Nothing Then
Return String.Empty
Else
Return String.Concat(" <li>Price: US$ ", value, ".00 per Student.")
End If
End Function
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
End Class
How do i convert getMOPrice to a double? In this section i have added the unit info but in another section i wanted to take the value and multiply is by the sales tax = 18%.
I found this on the msn site: ' Dim returnValue As Decimal
' returnValue = XmlConvert.ToDecimal(s)
but have no idea if it applies or how to apply it to my situation.
This is the xml snippet:
<product code="mo" name="MO Course">
<duration>1 Day or 3 Days</duration>
<visible>true</visible>
<prices>
<price vehicle="mo1">155</price>
<price vehicle="mo3">465</price>
</prices>
<courseSummary>Stuff.</courseSummary>
<courseUrl>link</courseUrl>
</product>
Any help is greatly appreciated.
Thanks in advance.
Tania