asp.net - Change Currency in aspx vb code
问题描述
I have been given a website in aspx and I had to make some changes. Unfortunately I am not a programmer, but I have managed to do most of the changes by looking at the code and using common sense. But they only thing I am not able to do is change the currency from $( us dollars) to £(GBP) basically I have a form with a dropdown list( see image) drop down menu with $ and the code is this
InsertFirstListItem(DropDownCoverAmount, "How much cover would you like?", "")
DropDownCoverAmount.Items.Add(New ListItem("Less than £50,000", "upto50"))
For intLoop As Integer = 50000 To 700000 Step 10000
DropDownCoverAmount.Items.Add(New ListItem(intLoop.ToString("C0"), intLoop.ToString))
Next
DropDownCoverAmount.Items.Add(New ListItem("More than £700,000", "above700"))
It's going up by 10.000 from 50.000 to 700.000 But it does it in dollars. How and where would I change it to GPB £
Any Help will be highly appreciated
Update (2018-06-18 12:39:19Z):
Following the comments, the code is now
InsertFirstListItem(DropDownCoverAmount, "How much cover would you like?", "")
DropDownCoverAmount.Items.Add(New ListItem("Less than £50,000", "upto50"))
Dim ci = New Globalization.CultureInfo("en-GB")
For intLoop As Integer = 50000 To 700000 Step 10000
DropDownCoverAmount.Items.Add(New ListItem(intLoop.ToString("C0", ci), intLoop.ToString))
but still getting errors.
解决方案
推荐阅读
- asp.net-core - ASP.NET Core 3.1 Cookie 身份验证 - 滑动到期不起作用
- java - 如何使 DateTimeFormatter 以法语输出 3 个字符月
- c# - 错误“连接未关闭。连接的当前状态为打开”
- python - 如何在 Win 64 上安装和使用 python 模块?
- javascript - 如何使用 PptxGenJs 加载现有的 pptx 文件
- homebrew - 在 /usr/local/include 中找到未编译的头文件
- java - 用于初始化 bean 列表的注解等效项
- c - 您通常如何在 C 中的交互式 REPL 程序中扫描/解析命令,有标准方法吗?
- vb.net - PrintDocument 第二次打印失败
- neural-network - 神经网络 - 每个权重的不同学习率