YMCMb 0 Light Poster

Hi Guys,

Need help converting a hidden field value to a double,

i have a text box which takes in a percentage value,

this in the code behind is:

If MyRadioBtn.Value = 1 Then
            If TBFixedPercent.Text.Count = 0 Then
                LblFXPerc.Visible = True
                LblFXPerc.Text = "* Please insert a fixed percentage"
            Else
                LblFXPerc.Visible = False
                hfFixedRate.Value = TBFixedPercent.Text
            End If
            'This will see if the radio button is set to No
        ElseIf MyRadioBtn.Value = 0 Then
            Dim MyValue As Double = 0
            hfFixedRate.Value = MyValue
        End If

Then i convert the hidden field value to a double by the following code:

Dim MyUniqueRate As Nullable(Of Double) = 0.0
        If Integer.TryParse(hfFixedRate.Value, MyUniqueRate) Then
        Else
        End If

And it doesnt work :( can someone please help me, as when i add it to my database, even if the user selects True in the radio button it does execute the rest of the query.

Can someone help please

Thanks in advance :)