We have the following field names in our database with data type of decimal:
RentalFee
ExtraHourFee
CancelFee
KeyDeposit
When attempting to pass their values as querystring from one page to another, we run into Input string was not in a correct format
error.
Here is a snippet of the markup:
<asp:TemplateField HeaderText="Select" SortExpression="siteid">
<ItemTemplate>
<asp:HyperLink ID="hdReserve" Text="Select" runat="server"
NavigateUrl='<%# "Reserve.aspx?id=" + Eval("siteId") + "&groupsize=" + ddlPartySize.SelectedValue + "&facilityFees= " + Eval("RentalFeeAmount") + "&facilityFees= " + Eval("RentalFeeAmount") + "&depoitAmt= " + Eval("DepositAmount") + "&cancelAmt= " + Eval("CancellationAmount") + "&keydeptAmt= " + Eval("KeyDepositAmount") %>' />
</ItemTemplate>
</asp:TemplateField>
Then the values are grabbed from codebehind:
Dim intRentalFee As Decimal
Dim intExtraHourFee As Decimal
Dim intCancelFee As Decimal
Dim intKeyDeposit As Decimal
rentalfeeHide.Text = Request.QueryString("facilityfees")
extrahrfeeHide.Text = Request.QueryString("extrahour")
cancelfeeHide.Text = Request.QueryString("cancelAmt")
keydepositfeeHide.Text = Request.QueryString("keydeptAmt")
intRentalFee = rentalfeeHide.Text
intExtraHourFee = extrahrfeeHide.Text
intCancelFee = cancelfeeHide.Text
intKeyDeposit = keydepositfeeHide.Text
' Add all up to get total fee
lblTotal.Text = intRentalFee + intExtraHourFee + intCancelFee + intKeyDeposit
Any ideas how to resolve this?